Title: Re: New task from email
On 17/2/03 19:58, "Richard Shane" <[EMAIL PROTECTED]> wrote:

> Allen
>
> You wrote an Applescript that creates a new task from a contact.  It has been
> most useful – thanks.  When I'm about to send an email, I often want to create
> a task to remind me after a certain time period to check to see if that person
> has replied to my email.  I went to applescriptcentral.com and checked if
> there was a script that creates a new task from an email.  Search didn't come
> up with anything.  Does it exist?  If not, would you think it useful enough
> that you might create it?  Thanks.
>
> Richard


There is a script in my scrpt menu that is called "New task from message" - it has a Microsoft Copyright tag,so I presume it was distributed with some version of office. Here is the script in it's entirety:

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
        
        -- get the information from the message, and store it in variables
        set theName to subject of theMessage
        set theCategory to category of theMessage
        set thePriority to priority of theMessage
        set theContent to content of theMessage
        
        -- create a new task with the information from the message
        set newTask to make new task with properties {name:theName, content:theContent, category:theCategory, priority:thePriority}
        
        -- create a link between the message and the new task
        link theMessage to newTask
    end repeat
    
    -- if there was only one message selected, then open that new task
    if (count of selectedMessages) = 1 then open newTask
end tell
--
Barry

Reply via email to