Вахмурка

|
Posted: Tue Dec 02, 2008 20:14 Post subject: |
|
|
Ну вот, что-то получилось: Code: |
args Path
local hwnd = win.handle("c=TTOTAL_CMD")
local Panel = ifelse(tc.active(hwnd) == "left", 8, 7)
local TMLB = childwin.handle(hwnd, "TMyListBox", Panel)
local Counter = win.sendmessage(TMLB, 0x0190, 0, 0)
local Report = Path ++ "1.txt"
local Str
local TabChar = esc(?+\t+, ?+\+)
if(Counter)
win.sendmessage(hwnd, 0x400+51, 3304, 0)
for(;file.validpath(Report);)
file.delete(Report)
endfor
win.sendmessage(hwnd, 0x400+51, 2026, 0)
win.sendmessage(hwnd, 0x400+51, 3301, 0)
for(;)
Counter = win.sendmessage(TMLB, 0x0190, 0, 0)
if(Counter)
break
endfor
win.postmessage(hwnd, 0x400+51, 2039, 0)
for(;)
if(win.getfocus() != hwnd)
break
endfor
win.sendkeys(Report)
keys {enter}
wait.for(10000, file.validpath(Report))
Panel = file.open(Report, "r")
if(Panel <= 0) do
messagebox("ok error", "File not opened", "FILE plugin error #1")
quit
endif
local CSV = Path ++ "1.csv"
local Result = file.open(CSV, "w")
if(Result <= 0) do
messagebox("ok error", "File not opened", "FILE plugin error #2")
quit
endif
for(not(file.eof(Panel)))
Str = file.readstring(Panel)
if(not Str)
continue
Counter = Path ++ replaceg(Str, TabChar, ";")
file.writeline(Result, Counter)
endfor
file.close(Panel)
file.close(Result)
win.sendmessage(hwnd, 0x400+51, 540, 0) |
Выкладывать на сайт пока не буду - полуфабрикат как-никак.
Аргумент "%P"
Не сделано вот это: Quote: | если есть в каталоге изображение(jpeg jpg) ссылка на него в формате название_каталога\название_картинки.расширение
9. так же и на остальные типы файлов дать ссыкли. | потому что неясно, как эти ссылки запихать в csv. Так что ставь задачу четко: какой файл ты хочешь получить на выходе.
Остальной народ: если вам это нужно, пишите, что бы вы хотели от скрипта для себя, любимых. _________________ Сайт PowerPro+Total Commander
Скрипты PowerPro для Total Commander
* * *
«Не усматривайте злого умысла в том, что вполне объяснимо глупостью» (Р. Хэнлон) |
|