Hello everyone. First post; please don’t shoot me.
So I’m trying to write a script that automates the ludicrously complicated process of getting onto a wireless network (Wifi, then PPOE over that, then VPN over that). All seems okay, but the code I stole from here to connect to VPN, while it works for PPOE too, produces a dialog asking for my password each time – despite the fact that the PPOE password is set in the relevant part of the Network pref pane.
Here’s what I have. Any tips on avoiding the password dialog would be hugely appreciated.
tell application "System Events"
tell current location of network preferences
set PPOEService to service "Nomadic" -- name of the VPN service
if exists PPOEService then connect PPOEService
end tell
end tell