Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ilfn143

macrumors 6502a
Original poster
Aug 27, 2008
520
96
Enron by the Sea
i need help with a script that'll connect to a list of vpn if it's disconnected. the problem is it's connect to another vpn after 2mins.

on idle
tell application "System Events"
tell current location of network preferences
set myVPNList to {"NE", "Sing", "UK", "LA", "NY", "Sea", "Mia"}
set theVPNItem to some item of myVPNList
set myConnection to the service theVPNItem
if myConnection is not null then
connect myConnection
end if
end tell
return 120
end tell
end idle
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.