Re: Using a Handler with a Whose Clause
Re: Using a Handler with a Whose Clause
- Subject: Re: Using a Handler with a Whose Clause
- From: Yvan KOENIG <email@hidden>
- Date: Mon, 5 Jun 2017 22:30:59 +0200
System Events refuse to apply whose to a list of file names.
tell application "System Events" set appNameList to every application process whose name is in {"Keyboard Maestro", "Finder", "Script Debugger"} end tell --> error "Erreur dans System Events : Impossible de convertir {\"Keyboard Maestro\", \"Finder\", \"Script Debugger\"} en type specifier." number -1700 from {"Keyboard Maestro", "Finder", "Script Debugger"} to specifier
We must test names one by one.
tell application "System Events" set appNameList to every application process whose (name is "Keyboard Maestro") or (name is "Finder") or name is "Script Debugger" end tell --> {application process "Finder" of application "System Events", application process "Script Debugger" of application "System Events"}
Yvan KOENIG running Sierra 10.12.5 in French (VALLAURIS, France) lundi 5 juin 2017 22:28:36
|
_______________________________________________
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