args Number
if(not Number)
Number = inputcancel("Enter number of files to select")
local hwnd = win.handle("c=TTOTAL_CMD")
local Panel = ifelse(tc.active(hwnd) == "left", 8, 7)
local TMLB = childwin.handle(hwnd, "TMyListBox", Panel)
local Current = win.sendmessage(TMLB, 0x0188, 0, 0)
win.sendmessage(TMLB, 0x0183, Current, Current + Number - 1)
One day I had to select exactly 100 (say) files. To do that with the script, I can run it either with the "100" parameter, or without any parameter, and specify this number in dialog box.