args List, Bef, Aft
local Item, Str
static Sec = "Buttonbar"
local fh = file.open(List, "r")
local hwnd = win.handle("c=TTOTAL_CMD")
local Path = file.folder(win.exepath(hwnd))
local Counter = 1
local Name = input("Name for Button Bar")
if(not Name)
quit
Name = Path ++ "\" ++ Name ++ ".bar"
local BBar = file.open(Name, "w")
if(fh > 0) do
for each Str in fh
if(not Str)
continue
ini.set(Name, Sec, "cmd" ++ Counter, Bef ++ Str ++ Aft)
ini.set(Name, Sec, "button" ++ Counter, Str)
ini.set(Name, Sec, "menu" ++ Counter, file.name(Str))
Counter++
endfor
else
messagebox("ok error", "File not opened", "FILE plugin error #1")
quit
endif
ini.set(Name, Sec, "Buttoncount", Counter - 1)
Script creates the button bar from selected files. Resulting bar likely needs some refinement. That is, the script performs routine boring job.
First script parameter is %L, second and third are strings added before and after the file name to the "Command" field.