/ Published in: AppleScript
![](/img/icon_sav.png?v3)
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
on toggle_vpn() tell application "System Events" repeat with s in services of network preferences if kind of s is 14 then -- 14 is VPN if not connected of configuration of s as boolean then tell s to connect else tell s to disconnect end if end if end repeat end tell end toggle_vpn
Comments
![RSS Feed for Comments RSS Icon](/images/rss.png?v3)