Skip to content

Instantly share code, notes, and snippets.

@jc-m
Last active March 16, 2023 20:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jc-m/f4ae181cdbac7adc8621e93a0c26c8e5 to your computer and use it in GitHub Desktop.
Save jc-m/f4ae181cdbac7adc8621e93a0c26c8e5 to your computer and use it in GitHub Desktop.
WSJT Auto CQ Applescript
# Set Alternate F1-F6 bindings
# TX Watchdogs 3 Min
# Hold TX Freq
# CQ:Max Dist
# tested on WSJT v2.6.1
set bundleId to "org.k1jt.wsjtx"
tell application id bundleId to activate
set txPause to false
set txWD to false
set lastLog to ""
tell application "System Events"
repeat
tell application process "WSJT-X"
set winList to every window
set frontmost to true
end tell
repeat with win in winList
set theTitle to name of win
if theTitle contains "Log QSO" then
tell application process "WSJT-X"
set call to value of text field "Call" of win
if call is not lastLog then
click button "Ok" of group 1 of win
set lastLog to call
else
click button "Cancel" of group 1 of win
end if
end tell
say "Contact Logged"
set txPause to true
else if theTitle starts with "WSJT-X" and theTitle does not contain "Wide Graph" then
tell application process "WSJT-X"
perform action "AXRaise" of win
set chkBox to value of checkbox "Enable Tx" of win as boolean
if value of item 1 of static text of static text 8 of win starts with "Runaway" then
set txWD to true
else
set txWD to false
end if
end tell
if not chkBox then
if txPause and not txWD then delay 20
tell application process "WSJT-X"
click button "Set Rx frequency to Tx Frequency" of group 1 of win
end tell
say "Calling CQ"
tell application "System Events" to key code 122
end if
end if
delay 1
end repeat
delay 5
end repeat
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment