Skip navigation
This discussion is archived

Applescript to click 'OK' in Firefox popup window

4245 Views 4 Replies Latest reply: Aug 2, 2008 10:36 AM by mrove RSS
Victor23 Calculating status...
Currently Being Moderated
Jul 28, 2008 4:39 PM
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 (1,120 points)
    Currently Being Moderated
    Jul 28, 2008 7:56 PM (in response to Victor23)
    Hey vb41480

    which pop up window would that be please



    Budgie
    G5 PPC 2Ghz 2.0GB Ram-iMac 2Ghz Intel 3GB Ram-iMac 2.4Ghz Intel 4GB Ram 10.5.2, Mac OS X (10.4.11)
  • Budgie Level 4 Level 4 (1,120 points)
    Currently Being Moderated
    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
    G5 PPC 2Ghz 2.0GB Ram-iMac 2Ghz Intel 3GB Ram-iMac 2.4Ghz Intel 4GB Ram 10.5.2, Mac OS X (10.4.11)
  • mrove Calculating status...
    Currently Being Moderated
    Aug 2, 2008 10:36 AM (in response to Victor23)
    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
    MacBook Pro, Mac OS X (10.5.4)

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.