Advertisement
Guest User

Untitled

a guest
Apr 18th, 2015
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. tell application "System Events"
  2. tell current location of network preferences
  3. if exists service "Displayed Name" then
  4. set VPNservice to service "Displayed Name"
  5. if connected of first configuration of VPNservice then
  6. disconnect VPNservice
  7. else
  8. connect VPNservice
  9. end if
  10. else
  11. display alert "Could not find VPN connection"
  12. end if
  13. end tell
  14. end tell
  15.  
  16. open "/Applications/Utilities/Toggle VPN.app"
  17.  
  18. osascript "/path/to/Toggle VPN.scpt"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement