Closed
Bug 355726
Opened 19 years ago
Closed 18 years ago
Not able to obtain URL from browser via AppleScript when window minimized
Categories
(Camino Graveyard :: OS Integration, defect)
Tracking
(Not tracked)
RESOLVED
WORKSFORME
People
(Reporter: ytrewq1, Unassigned)
References
Details
(Whiteboard: [needs-regression-range])
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.0.7) Gecko/20060911 Camino/1.0.3
Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.0.7) Gecko/20060911 Camino/1.0.3
Suppose only one Camino browser window is open and a page has been loaded and is viewable. I am able to determine the URL of this page via the following AppleScript code (tested in Script Editor among other places):
tell application "Camino"
URL of window 0
end tell
When the aforementioned browser window is minimized to the Dock, URL determination using the same aforementioned AppleScript no longer works. When testing with Script Editor, I get a dialog box with the following sort of content:
AppleScript Error
Camino got an error:
NSReceivedEvaluationScriptError: 3
I think whether the browser window is minimized to the Dock or not should have no influence on determining the URL (of the active tab) of a browser window.
For comparison, I tried a similar scenario with Safari. In that situation, minimizing the browser window to the Dock did not affect determination of the URL.
Reproducible: Always
Steps to Reproduce:
0. Start Camino, view some page on the web, and minimize Camino to the Dock
1. Open Script Editor
2. In an appropriate script window, enter the code:
tell application "Camino"
URL of window 0
end tell
3. Click on the 'Run' button in the script window
4. Observe the dialog box reporting the error
Actual Results:
I get a dialog box with the following sort of content:
AppleScript Error
Camino got an error:
NSReceivedEvaluationScriptError: 3
Expected Results:
I expected to see no error and an appropriate URL as a string displayed in the bottom-most text view of the script window.
The closest bug I noticed was: https://bugzilla.mozilla.org/show_bug.cgi?id=253486 but that didn't seem to be the same.
Comment 1•19 years ago
|
||
I can't reproduce this bug with trunk *or* with 1.0.3.
I wonder if this is Intel-only.
cl
Comment 2•19 years ago
|
||
I can repro this on a 2006100501 trunk, PPC.
Comment 4•19 years ago
|
||
This may well be fallout from the changes smfr made to what's considered a frontmost browser window.
I can't get the command to work at all, even with one non-minimized window :(
Someone should check to see if this worked before December of 2005 and is indeed a regression.
Comment 6•18 years ago
|
||
It works for me in Camino 1.0.3, but not on trunk. The error for me is "Can't make URL of window 1 into type reference."
Actually, trying to get even a reference to a window doesn't work: "NSReceiversCantHandleCommandScriptError".
Comment 7•18 years ago
|
||
Aha, this is a result of the NSCoreSuite -> ASKApplicationSuite change. It totally broke what limited AppleScript support we have.
Comment 8•18 years ago
|
||
Er, that's what broke it completely; may not be the cause of the summary of this bug(?).
Whiteboard: [needs regression window]
Updated•18 years ago
|
Whiteboard: [needs regression window] → [needs-regression-range]
WFM in a recent branch nightly (s/window/browser window/, since windows don't have URLs any more), though index 0 resolving is a bug, bug 395716.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•