Apr 07, '06 06:12:00AM • Contributed by: enzo sparacino
The multi-step procedure to reconnect is the following:
- Open the browser (if not already connected, it is redirected to a login homepage).
- Select the "user" field and type the username.
- Select the "password" field and type the password.
- Select the "provider" field and choose the provider from a list (it is enough for me to type the letter "O").
- Select the "OK" button and hit the enter key.
set CR to ASCII character of 13
tell application "System Events"
tell application "Camino" to activate
delay 30
keystroke tab & tab & tab & [username] & tab & ¬
[password] & tab & "O" & tab & CR
delay 20
tell application "Camino" to quit
end tell
end
I am using Camino as browser. The Tab keys are used to navigate through the fields of the login homepage; [username] and [password] in the script are replaced by my real username and password. The O is the key to digit after selecting the field containing the list of providers. The script is my first attempt to use AppleScript. It works.
I am pretty sure that there are many possible improvements and alternatives -- which I will be glad to learn from you.
