args Path, Name, Ext if(!Ext) Ext = "*" Ext = "." ++ Ext local hwnd = win.handle("c=TTOTAL_CMD") local Exepath = win.exepath(hwnd) local Len = length(Name) local mpDlgCaption = "CheckAscCounter Script" local mpIcon = "e:\Storage\Graphics\Icons\User\Incr.ico" local i, j, Char, mpDlgText, Prev, Cur local Quote = esc(?+\"+, ?+\+) local CtC = "&Copy to Clip" local Gt = "&Go to" for(i = Len; i > 0; i--) Char = Name[i - 1] if(not miscplugin.is_int(Char)) break endfor switch (i) case Len Char = "File name " ++ Name ++ Ext ++ " contains no counter" messagebox("ok error", Char, mpDlgCaption) quit case 0 Char = Name Name = "" break case else Char = Name[i, Len - 1] Name = Name[0, i - 1] endswitch local Digits = length(Char) local Total = repeat("9", Digits) for(i = eval(Char); i <= Total; i++) Len = fill(repeat("0", Digits), i) Cur = Path ++ Name ++ Len ++ Ext miscplugin.BalloonTip(1, "information", i, "timeout=5") if(!validpath(Cur)) do mpDlgText = "First missing file is '" ++ Cur ++ "'" local Ans = miscplugin.messagebox(1, Gt, CtC, "&Exit") if(Ans == Gt) do if(!Prev) do win.sendmessage(hwnd, 0x400+51, 2050, 0) else do(Exepath,"/O /S /L=" ++ Quote ++ Path ++ Prev ++ Ext ++ Quote) *keys {down} endif elseif(Ans == CtC) do clip.set(Cur) endif quit endif Prev = Name ++ Len endfor