Applescript Help

Discussion in 'Mac Programming' started by gumby777, Sep 22, 2007.

  1. gumby777 macrumors newbie

    Joined:
    Sep 22, 2007
    #1
    I am a total noob at applescript, I have barely learned anything. I am trying to login to my e-mail through a script, I know how to get to the webpage with "tell application "Safari"
    activate
    open location "http://www.X.com/mail/index.bml"
    end tell"
    X is my webhost eg Hotmail
    though from there how do i enter in my username and password through the script so that it will automatically log me in to my account??
    Seeing as I am such a begginer it would be helpful if you could please post the entire script using X,A and B for webhost, username and password!

    Thanks alot!!
     
  2. mkaake macrumors 65816

    Joined:
    Apr 10, 2003
    Location:
    mi
    #2
    To do it that way, you'll need to use UI scripting, which will be specific to the actual web page that you're trying to log in to.

    It's also specific to the browser you're using, and the version of OSX that you're running.

    If you can point those out to us, I'd be happy to point you in the right direction... but you'll end up having to do the grunt work yourself...
     
  3. gumby777 thread starter macrumors newbie

    Joined:
    Sep 22, 2007
    #3
    I am running mac os x version 10.4.10, running safari and have many e-mails but one is yahoo.ca
     
  4. Mekanik561 macrumors newbie

    Joined:
    Feb 10, 2007
    #4
    Adjust the number of tabs as needed.

    tell application "Safari"
    activate
    open location "http://www.blah.com"
    delay 1 -- so the page can load
    end tell
    tell application "System Events"
    tell application process "Safari"
    keystroke tab
    keystroke tab
    keystroke "username"
    keystroke tab
    keystroke "password"
    keystroke return
    end tell
    end tell
     
  5. gumby777 thread starter macrumors newbie

    Joined:
    Sep 22, 2007
    #5
    Thanks for the help but I had already come up with a script that did this and I thought I had done something wrong but I am thinking now that the number of tabs changes each time. I am trying to do this for www.fatcow.com/mail. I would appreciate if there is some way that I could click where the username is and then click the password then the login button because these tabs don't seem to be working though thanks alot for the suggestions!
     

Share This Page