Re: Script for Auto-login to websites
Re: Script for Auto-login to websites
- Subject: Re: Script for Auto-login to websites
- From: Ed Stockly <email@hidden>
- Date: Wed, 4 Jun 2008 09:39:59 -0700
>>Alan>>
This works for me.
tell application "Safari"
activate
open location "http://mail.yahoo.com"
delay 5
tell application "System Events" to keystroke "username" & tab &
"password" & return
end tell
This is a good answer Alan!
The delay may need to be adjusted depending on the loading speed of
the site you go to.
In some cases you can wait until the name of the window has changed
set before proceeding.
repeat until the name of window 1 is "foo"
delay 1
end
True . . .but the script also will need adjusting to allow if the
particular web site being logged into doesn't automatically select
the username field. Some do. . . some don't.
That should be fairly easy to script, in most cases web sites are
fairly consistent. Once the page is open you may need to script a
couple tabs to get to your desired field.
There's also a security issue with having passwords in a script . . .
I use a property, which has to be set the first time it's run, then
remembers it from subsequent run and is invisible to prying eyes.
property myPass :""
if myPass = "" then
--insert routine getting password from user
HTH,
ES
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden