Volniy

|
Posted: Tue Jul 24, 2007 18:29 Post subject: |
|
|
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 |
|
|