• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Safari adds 2 windows....
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Follow-Ups:
    • Re: Safari adds 2 windows (partially solved)
      • From: Erik Ness <email@hidden>
References: 
 >Safari adds 2 windows.... (From: Erik Ness <email@hidden>)

  • Prev by Date: Re: Safari adds 2 windows....
  • Next by Date: Re: Safari adds 2 windows....
  • Previous by thread: Re: Safari adds 2 windows....
  • Next by thread: Re: Safari adds 2 windows (partially solved)
  • Index(es):
    • Date
    • Thread