Re: setting categories in Entourage X
Re: setting categories in Entourage X
- Subject: Re: setting categories in Entourage X
- From: Paul Berkowitz <email@hidden>
- Date: Tue, 25 Jun 2002 01:27:17 -0700
On 6/25/02 1:10 AM, "Sven Ryen" <email@hidden> wrote:
>
Paul responded:
>
>
> set categoryList to category of theContact --get the contacts categories
>
> set end of categoryList to category theCategory_SerialNumber_Name
>
> set category of theContact to categoryList
>
>
Are you sure that's what Garrett wanted, Paul? To me, it seemed like he
>
wanted to create a note without modifying the categories of the selected
>
contact/whatever.
My error. It's the category of the note he wanted to set later, you're
right.
>
>
Let's add the last category to categoryList:
>
>
set end of categoryList to category named theCategory_SerialNumber_Name
>
>
As you see, you can't just append the category name, you'll have to create a
>
reference to the "category named theCategory_SerialNumber_Name".
You don't actually need the word 'named' in there. You can always refer by
name by just naming the object with the string name following the object
word (the word order is rather more French- than English-like, which I don't
know has ever been remarked before). For example:
set end of categoryList to category "Special"
That's actually the way most people do it, although there's nothing wrong
with
set end of categoryList to the category named "Special"
So, with that immense variable, you can do the same thing:
set end of categoryList to category theCategory_SerialNumber_Name
(I'd suggest a shorter variable, omitting 'the' since it's not an object but
just a name. Something still meaningful and descriptive but shorter, like
'SerialNumber_Name'. Garrett may even have confused himself by this choice
of variable label: it sounds as if it's an actual category rather than just
a name.)
>
>
So, skip the loop, simply add a reference to the extra category at the end
>
of the categoryList, and you'll be all set.
--
Paul Berkowitz
_______________________________________________
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.