applescript to create new task

S

stefan

Is there a simple way to do this?

I want to use the contents of the clipboard to specify the name of the
task.
I've already figured out how to make an applescript that copies the
text from a specified cell in Excel.

I would also like to map the category of the newly created task to the
filename of the Excel file. In other words, from a list of predefined
Entourage categories, I would like the new task to pick one based on
which Excel file the copied text originates from.

The icing on the cake would be to be able to assign priorities and
other attributes to the task based on other information in the Excel
file.

Anyone have any clues?

Thanks!
 
D

Dave Cortright

Is there a simple way to do this?

I want to use the contents of the clipboard to specify the name of the
task.
I've already figured out how to make an applescript that copies the
text from a specified cell in Excel.

I would also like to map the category of the newly created task to the
filename of the Excel file. In other words, from a list of predefined
Entourage categories, I would like the new task to pick one based on
which Excel file the copied text originates from.

The icing on the cake would be to be able to assign priorities and
other attributes to the task based on other information in the Excel
file.

Anyone have any clues?

Entourage ships with a script called "Create task from message". That's a
great place to start.
 
B

Barry N. Wainwright

Is there a simple way to do this?

I want to use the contents of the clipboard to specify the name of the
task.
I've already figured out how to make an applescript that copies the
text from a specified cell in Excel.

I would also like to map the category of the newly created task to the
filename of the Excel file. In other words, from a list of predefined
Entourage categories, I would like the new task to pick one based on
which Excel file the copied text originates from.

The icing on the cake would be to be able to assign priorities and
other attributes to the task based on other information in the Excel
file.

Anyone have any clues?

Thanks!

set theName to the clipboard ‹ transfer text from clipboard to a local
variable
set theContent to "Here is some text"
set theDueDate to (get current date)+1 -- tomorrow
set theReminder to (get current date)+0.958333 -- tomorrow (-1 hr)
set thePriority to normal -- could be lowest/low/normal/high/highest
set theCategory to {category "Work"} -- category(ies) must be pre-defined -
make sure it's a list!

make new task with properties {name: theName, completed: false, content:
theContent, due date: theDueDate, remind date and time: theReminder,
priority: thePriority, category: theCategory}

--
Barry Wainwright
Microsoft MVP (see http://mvp.support.microsoft.com for details)
Seen the Entourage FAQ pages? - Check them out:
<http://www.entourage.mvps.org/toc.html>

Please post responses to this newsgroup. If I ask you to contact me
off-list, remove '.INVALID' from email address before replying.
 
Top