• 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: Heads up. Safari window count resolved (sort of)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Heads up. Safari window count resolved (sort of)


  • Subject: Re: Heads up. Safari window count resolved (sort of)
  • From: Barry Wainwright <email@hidden>
  • Date: Mon, 19 Sep 2016 07:34:39 +0100

And, of course, that can be condensed to: 

count (every window where its visible is true)

-- 
Best regards,
Barry Wainwright



On 19 Sep 2016, at 05:48, Brian Christmas <email@hidden> wrote:

G’day Scripters

Further to my hassles getting the opened window count in Safari, Engineeering replied with this (which obviously will apply from Sierra on)…


This issue behaves as intended based on the following:

This is correct behavior. You can only rely on the count of visible windows matching what you see on screen. This script does the right thing:

tell application "Safari"
	set numberOfVisibleWindows to 0
	repeat with aWindow in windows
		if aWindow is visible then
			set numberOfVisibleWindows to numberOfVisibleWindows + 1
		end if
	end repeat
	say numberOfVisibleWindows
end tell

(I’ve just found a ‘Mail’ bug. Indenting the (Copy & Paste from bug report) above, duplicated the selection, with weird effects)

Regards

Santa




And what, you ask, was the beginning of it all?
And it is this......
Existence that multiplied itself
For sheer delight of being
And plunged with numberless trillions of forms
So that it might
find
itself
innumerably

Sri Aurobindo


Do not post admin requests to the list. They will be ignored. AppleScript-Users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: Archives: http://lists.apple.com/archives/applescript-users This email sent to email@hidden
References: 
 >Heads up. Safari window count resolved (sort of) (From: Brian Christmas <email@hidden>)

  • Prev by Date: Heads up. Safari window count resolved (sort of)
  • Next by Date: What on Earth????
  • Previous by thread: Heads up. Safari window count resolved (sort of)
  • Next by thread: What on Earth????
  • Index(es):
    • Date
    • Thread