Send an Entourage Tast

N

Nordic

Hello:

I cannot find a way to send an Entourage tast or convert it to an email to
send. The reverse is included in Entourage 2004 (a script to convert an email
to a task). Is there such a feature or a script to send a task as email?

thanks.
 
D

deathdruid

I cannot find a way to send an Entourage tast or convert it to an email to
send. The reverse is included in Entourage 2004 (a script to convert an email
to a task). Is there such a feature or a script to send a task as email?

I modified the "task from message script to do the reverse". It works
just fine with a single task selected. The error handling is not
perfect; it barfs noisily if nothing is selected. Is there a
"selectedTasks" equivalent of "selectedMessages"?

tell application "Microsoft Entourage"

-- get the currently selected task or tasks
set selectedTasks to selection

-- if there is no task or more than one task selected, warn the user
and then quit
set taskCount to count of items of selectedTasks
if selectedTasks is "" or selectedTasks is {} or taskCount > 1 then
display dialog "Please select a single task and then run this
script." with icon 1
return
end if

--if selection is not a task, warn the user and then quit
set theTask to item 1 of selectedTasks
set selectionClass to get class of theTask
if selectionClass is not task then
display dialog "Please select a task before running this script."
with icon 1
return
end if

--get the information from the task, and store it in variables
set theName to name of theTask
set theDueDate to due date of theTask
set theSubject to theName & " (due on " & day of theDueDate & " " &
month of theDueDate & ", " & year of theDueDate & ")"
set theCategory to category of theTask
set thePriority to priority of theTask
set theContent to content of theTask

--create the new message
set newMessage to make new outgoing message with properties
{subject:theSubject, content:theContent, category:theCategory,
priority:thePriority}

--open the new message
open newMessage
end tell

Hope this helps,
Rahul
 
A

Allen Watson

This should help you determine whether or not a task is selected.

tell application "Microsoft Entourage"
set x to the selection
if class of x is list then
set x to item 1 of x
end if
set itsClass to class of x
if itsClass is task then
display dialog "You've selected a task."
else
display dialog "You have not selected a task."
end if
end tell
 
Top