local hwnd = win.handle("c=TTOTAL_CMD") local Panel = ifelse(tc.active(hwnd) == "left", 0, 1) local i, Unmark, To local Step = 2 local What = "All" local Result = win.childhandlelist(hwnd, "c=TMyListBox") local From = vec.createfromwords(Result) if(From <= 0) do messagebox("ok error", "Vector not created", "VEC plugin error #1") quit endif for(i = 0; i < From.length; i++) if(win.gettext(From[i]) == "W_FtpLogList") do From.delete(i) break endif endfor if(From.length != 2) do messagebox("ok error", "Wrong number of TMyListBox windows", "MarkStep script") quit endif local Counter = win.left(From[0])*win.top(From[0]) To = win.left(From[1])*win.top(From[1]) local TMLB = ifelse(Counter < To, From[Panel], From[(-1)*Panel + 1]) local Current = win.sendmessage(TMLB, 0x0188, 0, 0) Counter = win.sendmessage(TMLB, 0x018B, 0, 0) local Cap = "File " ++ Current ++ " of " ++ Counter Result = Inputdialog("~Step=Step, What=Files to mark??All|Current & above|Current & below, Unmark=Unmark??", Cap) if(not Result) quit if(not miscplugin.is_int(Step) || Step <= 0) do messagebox("ok error", "Invalid step: " ++ Step, "'MarkStep' Script") quit endif if(What == "All") do From = 0 To = Counter elseif(What == "Current & above") From = 0 To = Current elseif(What == "Current & below") From = Current To = Counter endif Unmark = not(Unmark) for(i = From; i < To; i = i + Step) win.sendmessage(TMLB, 0x0185, Unmark, i) endfor win.setfocus(hwnd)