args Pattern
local hwnd = win.handle("c=TTOTAL_CMD")
local Config = env("WINDIR") ++ "/wincmd.ini"
local Temp, i
local AllKeys = ini.enum_keys(Config, "rename")
local Total = line(AllKeys, 0)
local Counter = 0
for(i = 1; i <= Total; i = i + 1)
Temp = line(AllKeys, i)
if(index(Temp, "_name") != 0)
Counter = Counter + 1
endfor
v = vec.create(Counter)
if(v == 0) do
messagebox("ok error", "Vector not created", "VEC plugin error")
quit
endif
Counter = 0
for(i = 1; i <= Total; i = i + 1)
Temp = line(AllKeys, i)
if(index(Temp, "_name") != 0) do
v[Counter] = Temp
Counter = Counter + 1
endif
endfor
vec.sort(v)
Counter = vec.binsearch(v, Pattern ++ "_name")
vec.destroy(v)
vec.unload
win.postmessage(hwnd, 0x400+51, 2400, 0)
wait.for(1500, activewindow("c=TMultiRename"))
keys {F2}{down 4}
for(i = 0; i <= Counter; i = i + 1)
keys {down}
endfor
keys {enter}
keys {enter}
keys {esc}
if(arg(0) == 1)
quit
keys {tab 7}