Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I set up an applescript application (saved under the name "BTGuard VPN-OSX) to force OSX to connect with my VPN service (BTGuard). I followed instructions from this link http://lifehacker.com/5932886/force-mac-os-x-to-automatically-reconnect-to-vpn, inserting "BTGuard" as my service.

This is what I entered in the Applescript box:

on idle
    tell application "System Events"
        tell current location of network preferences
            set myConnection to the service "BTGuard VPN"

            if myConnection is not null then

                if current configuration of myConnection is not connected then
                    connect myConnection
                end if
            end if
        end tell

        return 120
    end tell
end idle

However, when I click on the new app., I get this pop up message:

Can't get class svce "BTGuard VPN" of class locc of classnetp of application "System Events". I guess I don't know how to edit the command properly.

Can someone help me figure out the problem? Is it with the 'service'? What do?

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.