Differences between revisions 2 and 3
Revision 2 as of 2008-06-19 18:19:25
Size: 997
Editor: hwvpn-janssen86
Comment:
Revision 3 as of 2008-11-15 14:00:41
Size: 1001
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
Firefox doesn't really play in the Applescripting world. See [https://bugzilla.mozilla.org/show_bug.cgi?id=125419 this bug filed against it], and vote for that bug if you'd like to make it Applescriptable. Firefox doesn't really play in the Applescripting world. See [[https://bugzilla.mozilla.org/show_bug.cgi?id=125419|this bug filed against it]], and vote for that bug if you'd like to make it Applescriptable.
Line 27: Line 27:
Unfortunately, [https://bugzilla.mozilla.org/show_bug.cgi?id=427448 Firefox 3 broke this workaround]. Unfortunately, [[https://bugzilla.mozilla.org/show_bug.cgi?id=427448|Firefox 3 broke this workaround]].

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.

MacPython/Firefox (last edited 2008-11-15 14:00:41 by localhost)

Unable to edit the page? See the FrontPage for instructions.