Entourage: Move/File Messages

Hi, having trouble figuring this out, I’m new to Applescript.

I want to have one Applescript that I can pick from Entourage’s script menu that will file a selected message. I know I can create individual rules to move individual messages, but I wanted to have one menu choice that would take care of any message that was selected.

I started with Paul Berkowitz’s very cool “Set Sent Message Category” script but made no progress. I figured it can file it by Category or by From address. I would hard-code the folder names into the script. Here is a slightly modified version of the meat of Paul Berkowitz’s script:


set theContact to item 1 of theContacts
set theCategory to category of theContact
	if theCategory ? {} then
	set category of theMsg to theCategory
			--these are the 3 lines I added:
			if theCategory is "Family/Friends" then
				move theMsg to folder "J-Family/Friends"
			end if
		exit repeat -- just category of first recipient to have a non-empty category
	end if

To me, it looks like it should work (but it doesn’t do anything except change the category of the message).
So my basic questions are:

  1. how do I get it to match the category? by id? by name? and is that the right syntax?
  2. how do I get it to move a message?

Thanks to anyone who can help!

For looking at Entourage script you went to the right place. Paul’s scripts are some of the best I have seen. If yu haven’t foudn what you want yet, keep looking through the scripts till you find something that does work.

Move I think is accomplished only by having the folder id (names are not guaranteed to be unique).