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

geeperz27

macrumors newbie
Original poster
Jan 22, 2011
1
0
Hi guys, I'm new to Applescript and would like some assistance. I have an application called iVPN that I would like to start with some applescript code - just one problem in that it requires the admin password at startup.

I tried the following, but once the dialogue box appears to enter the password, nothing happens. It seems to stop just before the "delay 10" line. I've also tried it with just the keystroke line, but nothing happens (no password appears in the dialogue box that pops up).

Any help greatly appreciated, Thanks!.


tell application "iVPN" to open
tell application "System Events"
delay 10
key code 48 using {command down}
keystroke "password here"
key code 36
end tell
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.