Automation for connecting/disconnecting VPN

sjennings Posts: 1 New Member

I'd like to be able to connect/disconnect the macOS Freedome VPN via either a terminal utility or AppleScript.


I want to automatically connect the VPN when I connect to certain Wi-Fi networks, or when I trigger a global hotkey of some kind. The methods I've tried are:


1. I looked for a terminal utility inside the bundle to control the VPN, but didn't find one.


2. Tried to automate clicking the menu items via AppleScript. I used Automator's "Watch Me Do" feature to record clicking on the Freedome menu bar items. Running the Watch Me Do action within Automator works, but when I copy/paste the AppleScript it generates, the AppleScript is not able to open the Freedome menu.