Re: Entourage: Using AppleScript with Rules?
Re: Entourage: Using AppleScript with Rules?
- Subject: Re: Entourage: Using AppleScript with Rules?
- From: Paul Berkowitz <email@hidden>
- Date: Tue, 22 Jul 2003 14:46:34 -0700
On 7/22/03 2:26 PM, "Jason Bourque" <email@hidden> wrote:
>
>
I must of asked the wrong question. I know how to set up rules.
>
>
How does the applescript know to target the message handled by the rule?
>
>
Does the script I included work, it doesn't seem so to me.
>
>
>
tell application "Microsoft Entourage"
>
>
-- Get Message
>
set vMsg to item 1 of (get current messages)
>
>
tell vMsg
>
set vSubject to subject
>
end tell
>
>
end tell
>
>
display dialog vSubject
Because 'current messages' means not only 'selected messages in a folder in
the UI', it also means 'the message targeted by the rule running this
script, as list' (so you still need 'item 1'). It will work when you set up
your rule to "Run AppleScript", click the "Script..." button, and browse to
select this script SAVED as a compiled script, preferably in the Entourage
Script Menu Items folder (which lets you run the script also from the script
menu). It won't work until you've saved the script as a compiled script.
You can also run it on a selected message to test it, and it will work from
Script Editor like so, but that's not what you're asking.
Do not have the script open in Script Editor while you're trying to run it
from a rule in Entourage (although it should work anyway, frankly, if it's
been saved previously).
--
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.