local hwnd = win.handle("c=TTOTAL_CMD") local Source, Target if(tc.active(hwnd) == "left") do Source = 2 Target = 3 else Source = 3 Target = 2 endif local TMPs = childwin.handle(hwnd, "TMyPanel", Source) local TMPt = childwin.handle(hwnd, "TMyPanel", Target) local TMTCs = childwin.handle(TMPs, "TMyTabControl") if(TMTCs == "") quit local TMTCt = childwin.handle(TMPt, "TMyTabControl") local Counter = win.sendmessage(TMTCt, 4868, 0, 0) win.postmessage(hwnd, 0x400+51, 3009, 0) *keys {down 5}{enter} wait.for(200, win.sendmessage(TMTCt, 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) local Lock = childwin.handle(Parent, "TCheckBox", 5) local SemiLock = childwin.handle(Parent, "TCheckBox", 1) Hand = win.sendmessage(Lock, 240, 0, 0) Parent = win.sendmessage(SemiLock, 240, 0, 0) keys {esc} if(Hand != 0) win.sendmessage(hwnd, 0x400+51, 3010, 0) if(Parent != 0) win.sendmessage(hwnd, 0x400+51, 3012, 0) win.sendmessage(hwnd, 0x400+51, 3007, 0)