• 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: need explanation for trivial Safari script behavior
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: need explanation for trivial Safari script behavior


  • Subject: Re: need explanation for trivial Safari script behavior
  • From: Mitchell L Model <email@hidden>
  • Date: Mon, 18 Jul 2016 08:54:21 -0400

Yes, and not all windows have tabs (for instance, a Preferences window). In reality the thin code I posted most recently is missing some exception handling so that windows aren't processed unless they names AND tabs. I tend to use exception handling instead of filtering because (a) it handles screwball cases I didn't know about (though arguably this is bad because I should discover those cases — but if you want to distribute your code, exception handling is more reliable) and (b) my programming background leads me to use exception handling as another way to filter.

On Jul 18, 2016, at 8:02 AM, Christopher Stone <email@hidden> wrote: 

The trouble with this is that not all windows are documents.

To get only document windows we need a filter:

set winList to windows where its document is not missing value



 _______________________________________________
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: need explanation for trivial Safari script behavior
      • From: Christopher Stone <email@hidden>
References: 
 >need explanation for trivial Safari script behavior (From: Mitchell L Model <email@hidden>)
 >Re: need explanation for trivial Safari script behavior (From: Axel Luttgens <email@hidden>)
 >Re: need explanation for trivial Safari script behavior (From: Christopher Stone <email@hidden>)

  • Prev by Date: Re: How to create a document?
  • Next by Date: Re: need explanation for trivial Safari script behavior
  • Previous by thread: Re: need explanation for trivial Safari script behavior
  • Next by thread: Re: need explanation for trivial Safari script behavior
  • Index(es):
    • Date
    • Thread