after some thought and a good look again at that program i came up with a much better way than using scan at all
try this also handles problem of enable tx button becoming unchecked for any reason
Macro BlankAreaCk2
no mouse commands no screen coordinates
try this also handles problem of enable tx button becoming unchecked for any reason
Macro BlankAreaCk2
int w=win("WSJT-X v2.0.0 by K1JT" "Qt5QWindowIcon")
int c xy checked mx my mw mh
Acc a b
a.Find(w "TEXT" "" "" 0x0)
rep
,b.Find(w "CHECKBUTTON" "Enable Tx Alt+n" "" 0x1001)
,checked=b.State&STATE_SYSTEM_CHECKED
,if !checked
,,b.Location(mx my mw mh)
,,c=child(b)
,,ScreenToClient c +&mx
,,mx+mw/2; my+mh/2 ;;center
,,xy=(mx&0xffff)|(my<<16)
,,SendMessage(c WM_LBUTTONDOWN 1 xy)
,,SendMessage(c WM_LBUTTONUP 0 xy)
,str lines=a.Value
,if numlines(lines) >5
,,out lines
,,out "stop"
,,b.Find(w "PUSHBUTTON" "Halt Tx Alt+H" "" 0x31)
,,b.DoDefaultAction
,,0.3
,,b.Find(w "PUSHBUTTON" "Erase Alt+E" "" 0x1)
,,b.DoDefaultAction
,1