• 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
Entourage: Obtaining items where the item's every category is contained in a list
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Entourage: Obtaining items where the item's every category is contained in a list


  • Subject: Entourage: Obtaining items where the item's every category is contained in a list
  • From: "Patrick Gerzanics" <email@hidden>
  • Date: Mon, 19 Jan 2004 10:30:01 -0600

Hello. I'm finding it difficult to accomplish something like the following
in a single query. Perhaps it is not possible? Regardless, here goes (This
was all typed in an e-mail editor, so typos probably exist but should not
change the logic I utilize):

tell application "Microsoft Entourage"
set eventList to {}
set tempList to every event
set categoryList to {category "Personal", category "Family", category
"Holiday"} --example category list
repeat currEvent in tempList
tell currEvent
set allFound to true
repeat currCategory in category
if (currCategory not in categoryList) then
set allFound to false
end if
end repeat
end tell
if (allFound) then
set currEvent to end of eventList
end if
end repeat
end tell

I'd like to accomplish this in a single query, essentially returning all
items where 'every' category of the item is contained in the list. The
important thing is that categoryList is of variable length and changes
depending on parameters to the script so I can't hard-code it.

I've tried:

set eventList to every event where its category is contained in categoryList

But this only returns events where its 'primary' category is in the
categoryList, not every category.

Any suggestions for how to do this?

Thanks for any and all assistance!

-Patrick
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Entourage: Obtaining items where the item's every category is contained in a list
      • From: Paul Berkowitz <email@hidden>
  • Prev by Date: Re: Standard Additions 'read' command - basic questions
  • Next by Date: Custom Icons?
  • Previous by thread: Re: "Dynamic binding" of applications/class-names
  • Next by thread: Re: Entourage: Obtaining items where the item's every category is contained in a list
  • Index(es):
    • Date
    • Thread