How to get the current url of the current tab or window in Firefox?

Does anyone know how to get the current url and maybe title of the page in the currently active tab or window in Firefox? I didn’t find any documentaions and what I tryd didn’t work.

Here’s what I would do with Safari:

tell application "Safari"
	set thisPage to do JavaScript "document.URL" in document 1
end tell

But the same tactic dosnt seem to work with Firefox. Any ideas?

Fredi

Look here:
http://bbs.applescript.net/viewtopic.php?id=9838

Thx. Exactly what I need. :slight_smile:

Fredi

I tried the examples there but neither the the pTit nor the curl classes worked. Have they changed name in the last 18 years?

tell application "Firefox"
   set theURL to class curl of window 1
end tell

tell application "Firefox" to class pTit of window 1