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: Помогите запустить скрипты от Вахмурки 
Author Message
Paranoik



PostPosted: Sat Sep 29, 2007 17:42    Post subject: Reply with quote

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 установлены
View user's profile Send private message


Powered by phpBB © 2001, 2005 phpBB Group