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

thriftinkid

macrumors regular
Original poster
Mar 24, 2008
119
0
Hey Guys,

I wrote a simple script that should open safari, take me to a website, and keystroke my name a password. It is case sensitive, so I wrote the following script. But I keep getting this error message:

syntax error:

Expected end of line but found identifier.


Any Ideas why?


For Reference:
Login Name:
login\MYname
Password: 1234fake


Code:
set theURL to "http://www.mywebsite.com"

tell application "Safari" to make new document with properties {URL:theURL}
delay 5
tell application "System Events"
keystroke "login\"
keystroke "my" using shift down
keystroke "name"
keystroke tab
keystroke "1234fake"
keystroke return
end tell
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.