• 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
Using a Handler with a Whose Clause
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Using a Handler with a Whose Clause


  • Subject: Using a Handler with a Whose Clause
  • From: Jim Underwood <email@hidden>
  • Date: Mon, 5 Jun 2017 01:32:52 +0000
  • Thread-topic: Using a Handler with a Whose Clause

Hey  guys,

I just posted this at MacScripter, and I know there is some overlap here, but there are also many of you gurus who don't hang out at MacScripter.

Any ideas/suggestions on how to make this work?


MacScripter

http://macscripter.net/viewtopic.php?pid=190350#p190350

Marc Anthony wrote:

Open this Scriplet in your Editor:

tell application "Finder" to ((path to documents folder)'s entire contents's folders whose name is in my getList())

on getList()
   tell application "Mail" to inbox's message's subject
end getList

Marc et al:  I've very impressed with this whose clause.  I've never seen anything like it, but would like to make use of this pattern.

However, it gets an error when I try this:

Open this Scriplet in your Editor:


tell application "System Events"    
   set appNameList to every application process whose name is in my getList()
end tell

on getList()
   return {"Keyboard Maestro", "Finder", "Script Debugger"}
end getList

(* 
=== ERROR ===
System Events got an error: Can’t make {"Keyboard Maestro", "Finder", "Script Debugger"} into type specifier.
*)

Any ideas/suggestions?

TIA.




Best Regards,

Jim Underwood
aka JMichaelTX

 _______________________________________________
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: Using a Handler with a Whose Clause
      • From: Christopher Stone <email@hidden>
    • Re: Using a Handler with a Whose Clause
      • From: Yvan KOENIG <email@hidden>
  • Prev by Date: Re: Can't make QuickTime Player 7 Pro auto quit on finishing playing a track
  • Next by Date: Re: Using a Handler with a Whose Clause
  • Previous by thread: Re: Can't make QuickTime Player 7 Pro auto quit on finishing playing a track
  • Next by thread: Re: Using a Handler with a Whose Clause
  • Index(es):
    • Date
    • Thread