Title: Re: Need a little script
On or near 12/5/00 12:12 AM, Paul Berkowitz at [EMAIL PROTECTED] observed:
> On 12/5/00 12:06 AM, "Michael W. Wellman" <[EMAIL PROTECTED]> wrote:
>
>> Allow me to extend and revise my statement.
>>
>> ...to remove *only* the "Junk" category...if the message in question belongs
>> to multiple categories.
>>
>> Which is what I meant, but failed to say. ;-)
>
> I hadn't been following earlier. You can remove the "Junk" category like
> this:
Thanks, Michael and Paul. So, then, incorporating my omitted line and Paul's code (variable names shortened), here is the complete script for the requestor. It removes the “Junk” category, adds the desired new category (for anyone else, adapt the category name), and moves the message into a sub-sub-folder (names must be supplied within the script, dummy names used here). Also, I give two variants, adding the new category name as the foremost category (shows at left side of column in folder listings) or as the last category (right side), and you should choose which line you want active when storing the script:
tell application "Microsoft Entourage" --
set currentMessages to the current messages --
repeat with theMsg in the currentMessages --
my ProcessMsg(theMsg) --
end repeat --
end tell --
on ProcessMsg(theMsg) --
tell application "Microsoft Entourage" --
set temp to the category of theMsg --
-- Remove the "junk" category--
set newCat to {}--
repeat with aCat in temp--
if aCat � category "Junk" then set end of newCat to aCat--
end repeat--
copy category "MF Extras/Other" to end of newCat --
(* Or, if you want that to be the first category that shows,--
use this version of setting the category list: --
set temp to {category "MF Extras/Other"} & temp
*)
set the category of theMsg to newCat--
move theMsg to folder "Sub-subfolder 2" of folder "Subfolder 1" of folder "Inbox" --
end tell --
end ProcessMsg --
--
Peace,
Allen Watson <[EMAIL PROTECTED]> XNS name: =Allen Watson
A Mac family since 1984 <http://home.earthlink.net/~allenwatson/>
Applescripts for Outlook Express and Entourage: <http://homepage.mac.com/allenwatson/>
- Re: Need a little script Michael Scheurer
- Re: Need a little script Michael W. Wellman
- Re: Need a little script Paul Berkowitz
- Re: Need a little script Paul Berkowitz
- Re: Need a little script Allen Watson
- Re: Need a little script Robert DeLaurentis
- Re: Need a little script Allen Watson
- Re: Need a little script Paul Berkowitz
- Re: Need a little script Michael Scheurer
