MozillaZine

Firefox 3.0 b3 (Mac) - AppleScript Problems/Bug?

Discussion about official Mozilla Firefox builds
rdm44
Guest
 

Post Posted February 13th, 2008, 12:58 pm

Hi folks,

I've read that AppleScript is better in FF 3; however, after install, certain calls are broken - or have changed and I cannot figure out what the changes are.

This no longer works:

tell application "Firefox"
set theURL to «class curl» of front window (* Grabs URL of page *)
set theTitle to «class pTit» of front window (* Grabs title of page *)
end tell

I've tried other nomenclature, but nothing works. Looked in the A/S dictionary, and nothing helps there either.

Either I'm missing it, or it isn't there. A fresh pair of eyes would be much appreciated.

Also, tried this old script to get the window properties (which includes the URL), but it does not work properly in FF3, either.

tell application "Firefox"
set windowProps to properties of front window as list
end tell

Thanks much!

LoudNoise
New Member

User avatar
 
Posts: 40048
Joined: October 18th, 2007, 1:45 pm
Location: Next door to the west

Post Posted February 13th, 2008, 1:41 pm

BETA questions are dealt with in the Builds forum. You should register and ask the mods to MOVE this there. Ask here:

http://forums.mozillazine.org/viewtopic ... highlight=
Last edited by LoudNoise on February 13th, 2008, 2:12 pm, edited 1 time in total.
Post wrangler
"Choose between the Food Select Feature or other Functions. If no food or function is chosen, Toast is the default."

rdm44
 
Posts: 4
Joined: February 13th, 2008, 1:45 pm

Post Posted February 13th, 2008, 1:59 pm

Thanks LoudNoise. I've registered and made the request.

Dartman
Moderator

User avatar
 
Posts: 11997
Joined: February 9th, 2006, 9:43 pm

Post Posted February 13th, 2008, 2:01 pm

Moving to Firefox Builds
Alcohol and Calculus don't mix. Never drink and derive.

teoli2003
 
Posts: 5091
Joined: November 10th, 2005, 2:54 am

Post Posted February 13th, 2008, 2:08 pm

Does it work with Fx 2? I thought AppleScript wasn't supported at all by Firefox...

rdm44
 
Posts: 4
Joined: February 13th, 2008, 1:45 pm

Post Posted February 13th, 2008, 2:17 pm

Yes, they work great in FF2 ...

AppleScript in FF is somewhat of a hack, extremely limited.

But there are certain calls that FF responds to, as mentioned in my first post. For instance, in FF 2, the second script I list gives this information as a result:

tell application "Firefox"
set windowProps to properties of front window as list
end tell

Result (Edited below at 2:37 PM ET on 2/15/08 to reflect the proper results including the different classes found in FF 2.x.x window properties):

{«class pObT»:window, «class pTit»:"Firefox 3.0 b3 (Mac) - AppleScript Problems/Bug? - MozillaZine Forums", «class curl»:"http://forums.mozillazine.org/viewtopic.php?t=628185", index:1, bounds:{639, 44, 1440, 809}, «class pLcn»:{639, 44}, closeable:true, titled:true, modal:false, resizable:false, zoomable:true, zoomed:true, «class pNMo»:true, «class pMMo»:false, floating:false, visible:true}

So the second and third results are, respectively, the page title, and the URL.

«class curl» and «class pTit» should give the page URL and Title when called.

Camino has also changed AppleScript syntax in 1.6x, which is frustrating, but at least A/S support is there in Camino. If only Tab Mix plus were there too...
Last edited by rdm44 on February 15th, 2008, 12:38 pm, edited 1 time in total.

rdm44
 
Posts: 4
Joined: February 13th, 2008, 1:45 pm

Post Posted February 14th, 2008, 9:38 am

Do any Mac Firefox beta users / Scripters have any input on this issue?

Many thanks.

Return to Firefox Builds


Who is online

Users browsing this forum: No registered users and 4 guests