HELP: Login Script (Webform)

I’ve written a rather simple script that was suppose to log in through a webform.
It does’nt work though.

But something seems to be wrong. I keep getting:
NSCannotCreateScriptCommandError on the keystroke part.


tell application "Safari"
	activate
	open location "https://secure.spymac.com/user.php?action=login"
	delay 5
	keystroke return
end tell

Chears

(PS: Safari fills out the form)

Hi,

Try:

tell application "Safari"
	activate
	open location "https://secure.spymac.com/user.php?action=login"
	delay 5
	tell application "System Events" to keystroke return
end tell

Best wishes

John M

thanks john - this works