local hwnd = win.handle("c=TTOTAL_CMD") local TMTC, Target, Lock, SemiLock if(tc.active(hwnd) == "left") do TMTC = runfile.Subs\Sub_TMTC(hwnd, 1) Target = runfile.Subs\Sub_TMTC(hwnd, 2) else Target = runfile.Subs\Sub_TMTC(hwnd, 1) TMTC = runfile.Subs\Sub_TMTC(hwnd, 2) endif if(not TMTC) quit local Counter = win.sendmessage(Target, 4868, 0, 0) win.postmessage(hwnd, 0x400+51, 3009, 0) *keys {down 5}{enter} wait.for(200, win.sendmessage(Target, 4868, 0, 0) != Counter) win.postmessage(hwnd, 0x400+51, 3009, 0) *keys {down 2}{enter} wait.for(activewindow("c=TCheckEditBox")) local Hand = win.getfocus() local Parent = childwin.parent(Hand) Hand = win.childhandlelist(Parent, "c=TMyCheckBox") if(word(Hand, 0) != 2) do messagebox("ok error", "Wrong number of checkboxes", "MoveTab script") quit endif local v = vec.createfromwords(Hand) if(not v) do messagebox("ok error", "Vector not created", "VEC plugin error") quit endif if(win.top(v[0]) > win.top(v[1])) v.swap(0, 1) Lock = v[0] SemiLock = v[1] Hand = win.sendmessage(Lock, 240, 0, 0) Parent = win.sendmessage(SemiLock, 240, 0, 0) keys {esc} if(Hand) win.sendmessage(hwnd, 0x400+51, 3010, 0) if(Parent) win.sendmessage(hwnd, 0x400+51, 3012, 0) win.sendmessage(hwnd, 0x400+51, 3007, 0)