• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Script for Auto-login to websites
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: Script for Auto-login to websites
      • From: SVV Satyanarayana <email@hidden>
    • Re: Script for Auto-login to websites
      • From: Doug McNutt <email@hidden>
References: 
 >Script for Auto-login to websites (From: SVV Satyanarayana <email@hidden>)
 >Re: Script for Auto-login to websites (From: Alan Fairlie <email@hidden>)
 >Re: Script for Auto-login to websites (From: Neil Laubenthal <email@hidden>)

  • Prev by Date: Re: copy files
  • Next by Date: Re: Control Universal Access Zoom with AS
  • Previous by thread: Re: Script for Auto-login to websites
  • Next by thread: Re: Script for Auto-login to websites
  • Index(es):
    • Date
    • Thread