Page 1 of 1

How to activate a VPN with Launchbar

Posted: Thu Jul 10, 2014 11:55 am
by danielgm
I can browse my VPNs in Launchbar, but nothing happens when I select them?

Re: How to activate a VPN with Launchbar

Posted: Thu Jul 17, 2014 6:54 pm
by jsturtridge
You could always trigger some AppleScript to start the VPN connection:

Code: Select all

on idle
   tell application "System Events"
      tell current location of network preferences
         set myConnection to the service "VPN_NAME"
         if myConnection is not null then
            if current configuration of myConnection is not connected then
               connect myConnection
            end if
         end if
      end tell
      return 10
   end tell
end idle


Hope that helps - J.