I am trying to write an AppleScript that, among other things, gets the URL of every open webpage in Firefox.
In Safari (and Chrome), this is done very simply:
tell application "Safari" to return URL of every tab in every window
However, it seems to me that Firefox offers no real AppleScript support, such as for getting the URL of any tab or window. When I google the terms "Firefox" and "AppleScript" together, I mostly get Firefox bug requests asking for AppleScript support to be restored, last updated in 2010 or 2011 (like this and this).
Am I right in thinking, then, that Firefox no longer offers any proper AppleScript support? I realize that there are some semi-workarounds, such as simulating key-commands in AppleScript, but those aren't really practical for my purposes.
To see all of the AppleScript commands that Firefox responds to, launch AppleScript Editor, select the menu File > Open Dictionary...
, and choose the Firefox application.
You'll find what you're expecting: Firefox doesn't offer any useful AppleScript commands.
Firefox 3.5 and earlier supported this, even though the command was not visible in the dictionary:
tell application "Firefox"
get «class curl» of window 1
end tell
Firefox 3.6 removed this feature, and as of now (Firefox 22.0) it has not been restored.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With