Re: need explanation for trivial Safari script behavior
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