local hwnd = win.handle("c=TTOTAL_CMD")
local Coms = "путь\TOTALCMD.INC"
local Sections = ini.enum_sections(Coms)
local NS = line(Sections, 0)
local CR = esc(?+\n+, ?+\+)
local i, j, All, Cles, OneSec, NK, Comm, Semicolon, Numbers, OneKey
for(i = 1; i <= NS; i++)
OneSec = line(Sections, i)
Cles = ini.enum_keys(Coms, OneSec)
NK = line(Cles, 0)
for(j = 1; j <= NK; j++)
Comm = line(Cles, j)
OneKey = ini.get(Coms, OneSec, Comm)
Semicolon = index(OneKey, ";")
if(Semicolon == length(OneKey))
continue
Numbers = Numbers ++ select(OneKey, Semicolon - 1) ++ CR
All = All ++ Comm ++ " = " ++ OneKey ++ CR
endfor
endfor
pickstring(All, "Select a command to run")
if(not _pickedline_)
quit
NS = line(Numbers, _pickedline_)
win.sendmessage(hwnd, 0x400+51, NS, 0)