Title: Re: Basic scripting advise
Try this "template" script. Run it from a rule and it will operate on each incoming message. Select messages in a folder and it will run on each selected message. You put in the meat...this is the skeleton.
tell application "Microsoft Entourage"
-- get the currently selected message or messages
set selectedMessages to current messages
-- if there are no messages selected, warn the user and then quit
if selectedMessages is {} then
display dialog "Please select a message first and then run this script." with icon 1
return
end if
repeat with theMessage in selectedMessages
-- Your code goes here. An example:
-- get the information from the message, and store it in variables
set theName to subject of theMessage
set theCategory to category of theMessage -- not used in example
set theContent to content of theMessage -- not used in example
if theName contains "Move Me" then
-- folder and category named must already exist
set the storage of theMessage to folder "Save"
set the category of theMessage to {category "Moved"}
end if
end repeat
end tell
On or near 9/17/02 3:01 PM, Bob Jordan at [EMAIL PROTECTED] observed:
> Dear Entourage:mac Talk,
>
> Having played with Entourage rules and finding a few limitations there I am
> keen to have a try using scripts to do similar tasks. But having not used
> scripts before, I wonder can anybody point to some preliminary help on this
> topic, and possibly where to look for a basic starter script that can do a
> couple of simple rule checks on incoming mail. From such a script I would
> like to add in my own rules.
>
> I am familiar with a number of computer languages so expect no problems from
> that point but just thought a leg-up would help.
>
> Cheers and thanks
>
--
My web page: <http://home.earthlink.net/~allenwatson/>
My scripts page: <http:[EMAIL PROTECTED]/Scripts/>
Microsoft MVP for Mac Entourage/Word--<[EMAIL PROTECTED]>
- Basic scripting advise Bob Jordan
- Allen Watson
