4 Replies Latest reply: Aug 2, 2008 10:36 AM by mrove
Victor23 Level 1 Level 1
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)
  • Budgie Level 4 Level 4
    Hey vb41480

    which pop up window would that be please



    Budgie
  • Victor23 Level 1 Level 1
    When you have to type in a login id and password for a page, the pop-up along the top of the page. Thanks in advance for any help!
  • Budgie Level 4 Level 4
    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
  • mrove Level 1 Level 1
    I had the same challenge of scripting that OK button on
    Firefox's password manager pop up window.

    Here's the code I wrote to solve that:



    tell application "System Events"
    tell application process "firefox-bin"
    set frontmost to true
    keystroke return
    end tell
    end tell