I am trying to create an Applescript that can check the category of all
calendar events, and change those that are 'None' to a different
category ('Work'). I fully admit I am an Applescript novice, but I have
tried a number of things, but none have worked. Could someone possibly
help me out in putting that together?
It's a one-liner, Joel:
tell application "Microsoft Entourage"
set category of every event where its category is {} to {category
"Work"}
end tell
You've got to know three things:
1. The category property of events (and other objects) is a list of
categories (since objects can have more than one category).
2. "None" is not actually the name of a category : it just means 'no
categories", i.e. an empty list {}
3. You have to say 'where its' not 'whose' in this context; see the
thread "Searching for AppleScript references or object model" here for the
reason. (i.e. filter by Subject is ...)
(You could also do it more laboriously in a repeat loop but this method is
much neater - all in one fell swoop.)
--
Paul Berkowitz
MVP MacOffice
Entourage FAQ Page: <
http://www.entourage.mvps.org/faq/index.html>
AppleScripts for Entourage: <
http://macscripter.net/scriptbuilders/>
Please "Reply To Newsgroup" to reply to this message. Emails will be
ignored.
PLEASE always state which version of Microsoft Office you are using -
**2004**, X or 2001. It's often impossible to answer your questions
otherwise.