Re: Safari adds 2 windows....
Re: Safari adds 2 windows....
- Subject: Re: Safari adds 2 windows....
- From: Andrew Oliver <email@hidden>
- Date: Sun, 25 Jul 2004 22:05:43 -0700
>
Returns 2 more windows than are open.
Not here it doesn't. I get the same number of browser windows as I have
open.
Try:
tell application "Safari"
get name of every window
end tell
and check the result to see if that gives you any clue. My guess is the
other windows are 'Downloads' and 'Activity', but they could be others.
On fix may be to count the 'documents' rather than windows. As far as Safari
is concerned, 'document' appears to equate to a web page, so:
tell application "Safari"
set n to number of documents
end tell
might solve your problem.
Andrew
:)
On 7/25/04 9:45 PM, "Erik Ness" <email@hidden> wrote:
>
Greetings,
>
>
I've been very nfused tonight. Safari, when prompted with:
>
>
tell application "Safari"
>
[snip]
>
set n to the number of windows
>
>
Returns 2 more windows than are open.
>
>
When zero, it returns 2. When 5, it returns 7.
>
>
The workaround is pretty obvious. Is this behavior normal? Consistent?
>
>
Regards,
>
>
Erik Ness
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.