local Path = "D:\Utils\TotalCmd\*.bar" local Bar = pickfile(file.listfiles(Path, 0), "Pick Bar File") local Tab = esc(?+\t+, ?+\+) local CR = esc(?+\n+, ?+\+) local i, Key, Mess local Buttons = ini.get(Bar, "Buttonbar", "Buttoncount") if(ini_status != "OK") do messagebox("ok error", ini_status, "INI plugin error #1") quit endif if(not pproflag(0)) quit v = vec.create(6) if(v == 0) do messagebox("ok error", "Failure creating vector", "VEC plugin Error") quit endif v[0] = "button" v[1] = "cmd" v[2] = "param" v[3] = "path" v[4] = "menu" v[5] = "iconic" flag set 3 for(i = 1; i <= Buttons; i = i + 1) Mess = "" flag clear 1 2 if(ini.check_exists(Bar, "Buttonbar", "button" ++ i) == 3) do if(ini.get(Bar, "Buttonbar", "button" ++ i) != "") flag set 1 endif if(ini.check_exists(Bar, "Buttonbar", "cmd" ++ i) == 3) do if(file.validpath(ini.get(Bar, "Buttonbar", "cmd" ++ i))) flag set 2 endif if(pproflag(1) && pproflag(2)) do for(j = 0; j <= 5; j = j + 1) Key = v[j] ++ i if(ini.check_exists(Bar, "Buttonbar", Key) == 3) do Mess = Mess ++ Key ++ ": " ++ Tab if(i > 9 && j != 0) Mess = Mess ++ Tab Mess = Mess ++ ini.get(Bar, "Buttonbar", Key) ++ CR endif endfor Mess = Mess ++ CR ++ "Convert to shortcut?" Path = "Button #" ++ i ++ " of " ++ Buttons ++ " in " ++ Bar Key = messagebox("yesnocancel question", Mess, Path) if(Key == 0) do quit elseif(Key == 6) do flag clear 3 break endif endif endfor if(pproflag(3)) quit Path = ini.get(Bar, "Buttonbar", "cmd" ++ i) Key = "D:\Utils\TotalCmd\" ++ ini.get(Bar, "Buttonbar", "menu" ++ i) ++ ".lnk" if(ini.check_exists(Bar, "Buttonbar", "param" ++ i) == 3) do Tab = ini.get(Bar, "Buttonbar", "param" ++ i) else Tab = "" endif CR = ini.get(Bar, "Buttonbar", "button" ++ i) Buttons = revindex(CR, ",") Mess = ifelse(Buttons != 0, select(CR, Buttons - 1), CR) Buttons = select(CR, Buttons + 1, length(CR)) Bar = "Shortcut created with PowerPro Script from Total Commander Button" Bar = file.createshortcut(Path, Key, Bar, Tab, Mess, Buttons) if(Bar == 1) do messagebox("ok information", "Shortcut successfully created", Key) else messagebox("ok error", "Error creating shortcut", Key) endif vec.unload ini.unload