Total Commander Forum Index Total Commander
Форум поддержки пользователей Total Commander
Сайты: Все о Total Commander | Totalcmd.net | Ghisler.com | RU.TCKB
 
 RulesRules   SearchSearch   FAQFAQ   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Single Post  Topic: Копировать имя файла с %commander_path% 
Author Message
Volniy



PostPosted: Tue Jul 24, 2007 18:29    Post subject: Reply with quote

TumanI wrote:
нужно чтобы вместо статичного адресса был путь типа %commander_path%\plugins\exe\akell.exe


Попробуй через этот скрипт (посади его на кнопку, к примеру)

Code:
' File:         CopyWith%CP%.vbs
' Requirements: WSH Helper for TC by Volniy
' Copyright:    (c) 2007, Volniy

Option Explicit
Dim List, TCS, Cnt, Buf, strCP
Const CP = "%commander_path%"
Set TCS = CreateObject("TCScript.Helper")
Dim WshShell
Set WshShell = WScript.CreateObject("WScript.Shell")

strCP = WshShell.ExpandEnvironmentStrings(CP)

TCS.SendCommand ("cm_CopyFullNamesToClip")  'Копируем в буфер
List = Split(TCS.GetTextFromClip, vbNewLine) ' Получаем массив имен
For Cnt=LBound(List) To UBound(List)
  If InStr(1,List(Cnt),strCP, 1)= 1 Then ' strCP найден
     Buf = Buf & CP &  Mid(List(Cnt), Len(strCP) +1) & vbNewLine
  Else
     Buf = Buf & List(Cnt) & vbNewLine
  End If
Next
TCS.SetTextToClip CStr(Buf)

Set TCS = Nothing
Set WshShell = Nothing
MsgBox "Скопировано имен файлов:" & Cnt, vbInformation, "Завершено!"
WScript.Quit
View user's profile Send private message


Powered by phpBB © 2001, 2005 phpBB Group