Paranoik
|
Posted: Sat Sep 29, 2007 17:42 Post subject: |
|
|
DirColor
http://pprotcmd.narod.ru/Scripts/DirColor.htm
Позволяет задать цвет директории в зависимости от ее содержимого
Quote: | args Path
local hwnd = win.handle("c=TTOTAL_CMD")
local IniFile = pprofolder ++ "scripts\ini\DirColor.ini" (мой путь)
local Masks = ini.enum_keys(IniFile, "Colors")
local MCounter = line(Masks, 0)
local Dirs = file.listfiles(Path, 4)
local DCounter = line(Dirs, 0)
local i, j, OneDir, OneMask, OneKey
local Desc = file.open(Path ++ "descript.ion", "w")
if(Desc <= 0) do
messagebox("ok error", "File not opened", "FILE plugin error")
quit
endif
for(i = 1; i <= DCounter; i++)
OneDir = line(Dirs, i)
for(j = 1; j <= MCounter; j++)
OneMask = line(Masks, j)
if(file.validpath(OneDir ++ "\" ++ OneMask)) do
OneKey = ini.get(IniFile, "Colors", OneMask)
file.writeline(Desc, file.nametype(OneDir) ++ " " ++ OneKey)
endif
endfor
endfor
file.close(Desc)
win.sendmessage(hwnd, 0x400+51, 540, 0) |
Выдает ошибку:
Code: | ERROR: ini.enum_keys: INI FILE DOESN'T EXIST
ERROR occurred near line 5 of script DirColor:
local Masks = ini.enum_keys(IniFile, "Colors")
|
плагины win, ini, file установлены |
|