The default bug view has changed. See this FAQ.
Bug 464701 (pierotokou)

AppleScript access to window name and other properties

VERIFIED DUPLICATE of bug 427448

Status

()

Core
Widget: Cocoa
--
enhancement
VERIFIED DUPLICATE of bug 427448
9 years ago
9 years ago

People

(Reporter: pierotokou, Assigned: Josh Aas)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

9 years ago
User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; fr; rv:1.9.0.4) Gecko/2008102920 Firefox/3.0.4
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; fr; rv:1.9.0.4) Gecko/2008102920 Firefox/3.0.4

window name returns random value in appleScript, if you have accessed other window properties before such as «class curl».
Window properties  are not available any more if you use :
tell application "Firefox" to activate.
And thus until next restart of Firefox

Reproducible: Always

Steps to Reproduce:
1.tell application "Firefox" to return ( name of front window)
2.tell application "Firefox" to return («class curl» of front window)
3.tell application "Firefox" to activate
Actual Results:  
if you run step 1, it will work fine, then step 2 will return an error. if you restart Firefox and run step 2 first, it will return the url. if you try step 1 after after step 2, step 1 will return an error. If you run step 3, step 1 will work fine again but not step 2 ....

Expected Results:  
A reliable support of AppleScript in Firefox. AppleScript is very usefull to Mac developers, this is the only reason while Safari is yet more popular to Mac users than Firefox.
(Reporter)

Updated

9 years ago
Alias: pierotokou
Version: unspecified → 3.0 Branch
This bug report isn't very clear, so I can't test most of it.

But there is one part I can reliably reproduce:

1) Start Firefox 3.0.4.

2) Start Apple's Script Editor (/Applications/AppleScript/Script
   Editor).

3) Paste the following into top part of the Script Editor window, then
   click on the Run button:

   tell application "Firefox" to return (name of front window)

   Each time you do this, a different string of apparently random text
   will appear in the bottom part of the Script Editor's window.

With Firefox 2.0.0.18 you get the correct results (the string in the
front window's titlebar).

With today's Minefield nightly you always get an empty string.

I tested on OS X 10.5.5.
Assignee: nobody → joshmoz
Status: UNCONFIRMED → NEW
Component: General → Widget: Cocoa
Ever confirmed: true
Product: Firefox → Core
QA Contact: general → cocoa
Version: 3.0 Branch → unspecified
Assignee: joshmoz → smichaud
Assignee: smichaud → joshmoz
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 427448

Updated

9 years ago
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.