I'm using a Stream Deck and, because NordVPN doesn't have a key command to toggle the vpn (I mean why would they?) I'm using some KM gui magic. Run into a problem. It does the job but, new to AS, I can't work out how to get an output that I can use to tell Streamdeck to change the icon depending on whether it's on or off.
tell application "System Events" tell application process "Dock" tell list 1 tell UI element "NordVPN IKE" perform action "AXShowMenu" tell menu "NordVPN IKE" if menu item "Disconnect" exists then tell menu item "Disconnect" perform action "AXPress" end tell else tell menu item "Quick connect" perform action "AXPress" set connected to true end tell end if end tell end tell end tell end tell
that's my code. And it's turning it off and on but it's not giving me the alerts. I think I'm using Boolean and variables wrong.