This is a static archive of the Python wiki, which was retired in February 2026 due to lack of usage and the resources necessary to serve it — predominately to bots, crawlers, and LLM companies.
Pages are preserved as they were at the time of archival. For current information, please visit python.org.
If a change to this archive is absolutely needed, requests can be made via the infrastructure@python.org mailing list.

Firefox doesn't really play in the Applescripting world. See this bug filed against it, and vote for that bug if you'd like to make it Applescriptable.

However, there are some workarounds for Firefox 2. Adium uses this:

if ((application processes whose (name is equal to "firefox-bin")) count) is greater than 0 then
     tell application "Firefox"
         if (count of every window) is greater than 0 then
               set the end of candidateURLs to «class curl» of window 1
          end if
      end tell
end if

Hengist says this might be written in appscript like this:

from appscript import *
ff = app('Firefox')
appscriptref = ff.windows[1]
aemref = appscriptref.AS_aemreference
aemref = aemref.property('curl')
appscriptref = ff.AS_newreference(aemref)
print appscriptref.get()

Unfortunately, Firefox 3 broke this workaround.


2026-02-14 16:09