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: Jim Underwood <email@hidden>
- Date: Mon, 5 Jun 2017 20:37:46 +0000
- Thread-topic: Using a Handler with a Whose Clause
Thanks, Yvan.
So I guess this means that the terms used with a whose clause is application dependent.
Disappointing and confusing. I had always thought that it was as AppleScript term that applied to all apps.
Jim Underwood
aka JMichaelTX
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