Script to automate login

Hi,
I am in desperate need of a script to help log in to a mail website. Currently I have to access a mail system through a web browser (safari or other) using a two-step log-in. On the first page I have to put in a username and then a password composed of a fixed code and a random string generated by a key-fob that I carry. I then hit return and am directed to a new page where I put in a username and fixed password, hit enter and then am directed to my in-box.

Unfortunately, the site logs me off after only a few minutes of inactivity, so I end up spending most of my time doing this incredibly cumbersome log-in routine all the time - sometimes even after reading only one email. I am told that there is no way to pull my emails down to my laptop using an email client with this system.

So, I would like to create a script which would

  1. Open a browser window and navigate to login page 1
  2. Enter predefined username in field 1
  3. Enter predefined password string in field 2
  4. Invite user to enter string to append to password in field 2
  5. Select return
  6. Wait for next page to appear
  7. Enter predefined username string in field 1
  8. Enter predefined password in field 2
  9. Select (click) submit button

Any thoughts greatly appreciated!

Marcel

Marcel,
Have you tried system based scripting that can be feasible.

Instead of trying to do the script the fill ins for you (you have to wait for the script is ready) isn’t a real time saving solution I guess. Well if you can find a URL that is always the same like some web mail clients have a fixed URL for inbox. You can have a script that checks this URL and refresh your page every one minute. Or if the page is older than one minute, you could check every 5 seconds the URL. if the URL hasn’t changed the last 12 times (one minute has passed) you give a page refresh.