I wanted to by pass login page of exchange account… instead of
login page, i will provide username and password values from
Can I do this using apple script…
Any pointer on this would be great help…
I’ll be looking for quick reply
First open the web page and hit the tab key on your keyboard until the cursor is placed in the user name box. Count the number of times you need to hit the tab key to get it there.
For example: 5 times
Next hit the tab key to place it in the password field and count the number of times you need to hit the tab key to get it there.
For example: 1 time
If you know those 2 things then the following applescript can do it for you, just adjust the top variables to your values…
-- put in your values here
set theURL to "http://whatever" -- the url of the web page
set theName to "login name" -- your login name
set thePass to "the password" -- the login password
set firstTabCount to 5 -- the number of tabs it takes to get to the login name field
set secondTabCount to 1 -- the number of tabs it takes from the name field to the password field
set webPageDelay to 5 -- the number of seconds to wait making sure that the web page is fully loaded, adjust as needed
set myDelay to 0.2 -- a generic delay between keystrokes, adjust as needed
-- open the web page
open location theURL
tell application "Safari" to activate
tell application "System Events"
tell process "Safari"
-- tab to the name field
repeat firstTabCount times
-- enter the name
-- tab to the password field
repeat secondTabCount times
-- enter the password
but I wanted a solution which doesn’t show screen, means it would directly show the web page which appears after login.