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

Heads up. Safari window count resolved (sort of)


  • Subject: Heads up. Safari window count resolved (sort of)
  • From: Brian Christmas <email@hidden>
  • Date: Mon, 19 Sep 2016 14:48:34 +1000

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

  • Follow-Ups:
    • Re: Heads up. Safari window count resolved (sort of)
      • From: Barry Wainwright <email@hidden>
  • Prev by Date: Open New MacScripter Messages in Google Chrome
  • Next by Date: Re: Heads up. Safari window count resolved (sort of)
  • Previous by thread: Open New MacScripter Messages in Google Chrome
  • Next by thread: Re: Heads up. Safari window count resolved (sort of)
  • Index(es):
    • Date
    • Thread