Firefox Get URL not working?

Here’s my simple script:



set urllist to {"http://www.wired.com/", "http://www.esquire.com/women/women-we-love/halle-berry-sexiest-woman-alive-2008/", "http://www.cbssports.com/collegebasketball/polls/"}

repeat with thisurl in urllist
	set mydelay to 0.5
	tell application "Firefox"
		get URL thisurl
	end tell
end repeat


I keep getting this error message:

Firefox got an error: Can’t get URL “http://www.wired.com/

When I open the dictionary there are 3 commands including Get URL but no info on them. Is FF no longer offering even basic AppleScript support?

Same thing with Firefox 3.5.7 here. ‘Get URL’ doesn’t compile as a command in its own right, but as the language command ‘get’ followed by the property keyword ‘URL’.

Nigel…

huh? :expressionless:

Could you Anglicize that a bit for me or better yet throw up an example…:slight_smile:

I can get open location “http://www.apple.com” to work

Writing from the heart of England, I don’t see how it could be clearer. :wink:

Firefox’s dictionary lists a command called ‘Get URL’. When compiling your script on my machine, I’d expect the relevant section to look like this in my preferred AppleScript formatting colours:

tell application “Firefox”
Get URL thisurl
end tell

. where green is my preference for application keywords and red my preference for AppleScript language keywords. Instead it looks like this:

tell application “Firefox”
get URL thisurl
end tell

. which shows that the compiler isn’t finding the application keyword ‘Get URL’ in Firefox’s dictionary. It’s using the language keyword ‘get’ instead and getting the keyword ‘URL’ from somewhere else.

I noticed that too and but didn’t have the grey matter to come to the conclusion, thanks for illustrating. +1 for England! :slight_smile:

It has never :wink:

1 Like

Not sure if this has been mentioned here or not, but I encountered this problem today and found there is a workaround. Credit goes to: http://forums.macosxhints.com/showpost.php?p=572047&postcount=5

openFirefoxURL("http://www.apple.com/")

on openFirefoxURL(x)
	return do shell script "open -a Firefox" & space & quoted form of x
end openFirefoxURL

Any way to have the url’s open in tabs instead of new windows?

Thanks,

Carl

Hi, Carl.

In the “Tabs” pane of Firefox’s Preferences (I’m looking at Firefox 3.6.3), check the “Open new windows in a new tab instead” option.

Thanks Nigel. I see that works only if Firefox is already running. If it’s not it loads the url’s to new windows.

Carl