; ; AutoIt Version: 3.0 ; Language: English ; Platform: Win9x/NT/XP ; Author: Neil Robertson GM8EUG ; ; Script Function: Monitor WSPR status TX/RX (by looking at colour of status box) and ; switch HRD TX/RX to match status by clicking the appropriate button to control the rig. ; ;Set for FT-817 ; Check if user really wants to run the script - use a Yes/No prompt $answer = MsgBox(4, "WSPR9_817_TX", "Run?") ; If "No" was clicked (7) then exit the script If $answer = 7 Then MsgBox(0, "AutoIt", "OK. Bye!") Exit EndIf ; Bring WSPR to top WinActivate(" WSPR 1.12 by K1JT") ; Check that WSPR is running WinWaitActive(" WSPR 1.12 by K1JT") ; Move WSPR to top LHS of screen and to a known size so position of receiving/waiting/transmitting box on bottom RHS corner of WSPR window is known ; as we will be reading its colour later WinMove(" WSPR 1.12 by K1JT","",0,0,690,543) ; Bring HRD to top- WinActivate("HamRadioDeluxe - [FT-817]") ; Check that HRD is running WinWaitActive("HamRadioDeluxe - [FT-817]") ; Move HRD to bottom half of screen and to a known size so we know where selected button is ; as we will be reading its colour later WinMove("HamRadioDeluxe - [FT-817]","",0,544,1398,500) While 1=1 ;loop forever (sloppy!) ;set wspr_tx_flag to 0 i.e.RX or waiting $wspr_tx_flag=0 ; Bring WSPR to top WinActivate(" WSPR 1.12 by K1JT") ; Check that WSPR is running WinWaitActive(" WSPR 1.12 by K1JT") ;check if WSPR is transmitting by looking at colour of box at bottom RHS of window - if it is yellow i.e. TX then set flag to 1 if PixelGetColor( 675 , 526 ) = 16776960 then $wspr_tx_flag=1 ; Bring HRD to top WinActivate("HamRadioDeluxe - [FT-817]") ; Check that HRD is running WinWaitActive("HamRadioDeluxe - [FT-817]") ;if WSPR is set to TX i.e. yellow and HRD is set to RX i.e chosen button is green then click button to put rig into TX if $wspr_tx_flag=1 and PixelGetColor( 1094 , 824 ) = 39936 then ControlClick ("HamRadioDeluxe - [FT-817]","",1047) ;if WSPR is set to RX i.e. not yellow and HRD is set to TX i.e chosen button is red then click button to put rig back into RX if $wspr_tx_flag=0 and PixelGetColor( 1094 , 824 ) = 12582912 then ControlClick ("HamRadioDeluxe - [FT-817]","",1047) ;loop back and check WSPR again WEnd exit ; Finished!