Is is possible to script a VPN connection? I’d like to do so as part of a larger script for remote connection–this is the only part I can’t get automated! This question was posed in an earlier thread:
tell application “Internet Connect” to activate
tell application “System Events”
tell application process “Internet Connect”
pick menu item “New VPN Connection Window” of menu “File” of menu bar 1
click button “Connect” of group 2 of window “VPN Connection”
end tell
end tell
that’s funny, i do a search for “VPN” a year later and get my own old post! what justice.
anyway, i still have the same script, and, of course, panther breaks it. go figure. any suggestions? i will probably answer my own question and post it here, but i hope the process is a little easier this time!
tell application "Internet Connect" to activate
tell application "System Events"
tell application process "Internet Connect"
pick menu item "Connect" of menu "Connect" of menu bar item "Connect" of menu bar 1
delay 5
end tell
end tell
Anyway, I was recently reading Matt Neuburg’s recently released “AppleScript: The Definitive Guide,” which is very helpful when it comes to using AppleScript! In it, he suggests that :
“If you’re reduced to using GUI scripting to accomplish some goal, and if the target application is still being actively developed, then consider writing to the developer and requesting that the application be made genuinely scriptable”