Applescript to click 'OK' in Firefox popup window

Hello,

Recently wrote a bit of Applescript and I'm having a problem getting "Return" to close a pop-up authentication window in Firefox. I have the id/password saved and the fields are pre-filled, so if I can get the Applescript to automatically click the ok button, then everything should be good to go. Any ideas on what that pop-up box is called? Document 1? Thanks again!

MacBook Pro, Mac OS X (10.5.4)

Posted on Jul 28, 2008 4:39 PM

Reply
4 replies

Jul 29, 2008 5:28 PM in response to Victor23

Hi

Give this a go, this is ugly but works on a drop window I have that requires a user name and password, with buttons cancel and ok, change the amount of keystroke tabs to suit your set up

---------
activate application "Firefox"
delay 3.5 -- allow app to open, change delay to suit
tell application "System Events"
tell process "Firefox"
keystroke tab
keystroke tab
keystroke tab
keystroke return
end tell
end tell


-----------

Budgie

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Applescript to click 'OK' in Firefox popup window

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.