Hi,

Does anyone know how I can automatically create tasks from a list of events
?

Thanks

Paul W.

Re: Create Tasks from events by Paul

Paul
Sat Jan 17 14:46:45 CST 2004

On 1/17/04 12:18 PM, in article
BC2F4916.5079%puddy.thisisspam@soisthis.paulwilde.net, "Paul W"
<puddy.thisisspam@soisthis.paulwilde.net> wrote:

> Hi,
>
> Does anyone know how I can automatically create tasks from a list of events
> ?
>
It would have to be done by AppleScript. But there are differences between
tasks and events, you know; and you're not telling us what you'd want to do
about these differences.

For example, tasks don't have specific times, only due _dates_. So, you'd
want the due date to be the date of the event, or you want "no due date"
tasks?

How about Reminders? If the event has a reminder, do you want a reminder for
the task to be at the same time (task reminders _do_ have times, including
2:30 pm on the day) or the day before, or when, or no reminders, or what?

Do you want Location of the event moved to the Note? How about End Time?
Just forget about that?

Recurring tasks can't be scripted. Are any of the events recurring events?
The simplest thing, by far, in that case would be to make a (non-recurring)
task and transcribe the recurrence pattern into the Note so you can remake
the recurrence yourself. Technically, it might be possible to make separate
tasks by script by parsing the recurrence pattern, but it would be absurdly
complicated.


--
Paul Berkowitz
MVP Entourage
Entourage FAQ Page: <http://www.entourage.mvps.org/toc.html>
AppleScripts for Entourage: <http://macscripter.net/scriptbuilders/>

Please "Reply To Newsgroup" to reply to this message. Emails will be
ignored.

PLEASE always state which version of Entourage you are using - 2001 or X.
It's often impossible to answer your questions otherwise.


Re: Create Tasks from events by Paul

Paul
Sat Jan 17 15:09:07 CST 2004

Thanks for your reply, Paul - I was a bit sparse with my requirement (!)

It goes like this :

Requirement : take a list of events and make a task for each one.

Description of tasks : create a task for each event - set start date,
subject, no end date, category.

Expected result : task with due date being event start date, category event
category and subject event subject, other fields to be task default.

Extra info : the list of events is a study calendar, no events overlap, no
events have the same start date, no events have an end date.

I'm using entourage x.

Thanks.

Paul W.

> On 1/17/04 12:18 PM, in article
> BC2F4916.5079%puddy.thisisspam@soisthis.paulwilde.net, "Paul W"
> <puddy.thisisspam@soisthis.paulwilde.net> wrote:
>
>> Hi,
>>
>> Does anyone know how I can automatically create tasks from a list of events
>> ?
>>
> It would have to be done by AppleScript. But there are differences between
> tasks and events, you know; and you're not telling us what you'd want to do
> about these differences.
>



Re: Create Tasks from events by Paul

Paul
Sun Jan 18 01:47:33 CST 2004

> This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

--B_3157228054_10480203
Content-type: text/plain;
charset="ISO-8859-1"
Content-transfer-encoding: 8bit

OK, it's pretty simple. The "default reminder" for tasks is No Reminder so
you've got no reminder. It would be only a little trickier to script a
reminder if you want one: it could be a default time on the day or earlier.

Save in the Entourage Script Menu Items folder. Before running it select a
list of events (which need not be contiguous) in a Calendar custom view or
Search Results.


-------------------------------------------

tell application "Microsoft Entourage"
try
set theEvents to selection
if class of item 1 of theEvents ? event then error number -128
on error
beep 2
display dialog "You must select a list of calendar events in a
Custom View or Search Results panel." buttons {"Cancel"} default button 1
with icon 0
end try


repeat with i from 1 to (count theEvents)
repeat 1 times
set theEvent to item i of theEvents
if class of theEvent ? event then exit repeat --(skip if
non-event in mixed view)
set {theName, startTime, theCategories} to theEvent's {subject,
start time, category}
set startDate to startTime - (time of startTime)

make new task with properties {name:theName, due date:startDate,
category:theCategories}
end repeat
end repeat
-- set displayed area of main window to tasks area
beep 2
display dialog "Done!"
end tell

-----------------------------------

--
Paul Berkowitz
MVP Entourage
Entourage FAQ Page: <http://www.entourage.mvps.org/toc.html>
AppleScripts for Entourage: <http://macscripter.net/scriptbuilders/>

Please "Reply To Newsgroup" to reply to this message. Emails will be
ignored.

PLEASE always state which version of Entourage you are using - 2001 or X.
It's often impossible to answer your questions otherwise.


> From: Paul W <puddy.thisisspam@soisthis.paulwilde.net>
> Newsgroups: microsoft.public.mac.office.entourage
> Date: Sat, 17 Jan 2004 21:09:07 +0000
> Subject: Re: Create Tasks from events
>
> Thanks for your reply, Paul - I was a bit sparse with my requirement (!)
>
> It goes like this :
>
> Requirement : take a list of events and make a task for each one.
>
> Description of tasks : create a task for each event - set start date,
> subject, no end date, category.
>
> Expected result : task with due date being event start date, category event
> category and subject event subject, other fields to be task default.
>
> Extra info : the list of events is a study calendar, no events overlap, no
> events have the same start date, no events have an end date.
>
> I'm using entourage x.
>
> Thanks.
>
> Paul W.
>
>> On 1/17/04 12:18 PM, in article
>> BC2F4916.5079%puddy.thisisspam@soisthis.paulwilde.net, "Paul W"
>> <puddy.thisisspam@soisthis.paulwilde.net> wrote:
>>
>>> Hi,
>>>
>>> Does anyone know how I can automatically create tasks from a list of events
>>> ?
>>>
>> It would have to be done by AppleScript. But there are differences between
>> tasks and events, you know; and you're not telling us what you'd want to do
>> about these differences.
>>
>
>


--B_3157228054_10480203
Content-type: text/html;
charset="ISO-8859-1"
Content-transfer-encoding: quoted-printable

<HTML>
<HEAD>
<TITLE>Re: Create Tasks from events </TITLE>
</HEAD>
<BODY>
<FONT FACE=3D"Verdana, Helvetica, Arial"><SPAN STYLE=3D'font-size:12.0px'>OK, i=
t's pretty simple. The &quot;default reminder&quot; for tasks is No Reminder=
so you've got no reminder. It would be only a little trickier to script a r=
eminder if you want one: it could be a default time on the day or earlier.<B=
R>
<BR>
Save in the Entourage Script Menu Items folder. Before running it select a =
list of events (which need not be contiguous) in a Calendar custom view or S=
earch Results.<BR>
<BR>
<BR>
-------------------------------------------<BR>
<BR>
<FONT COLOR=3D"#0000FF"><B>tell</B></FONT> <FONT COLOR=3D"#0000FF">application<=
/FONT> &quot;Microsoft Entourage&quot;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=3D"#0000FF"><B>try<BR>
</B></FONT> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=3D"#0000FF"=
><B>set</B></FONT> <FONT COLOR=3D"#408000">theEvents</FONT> <FONT COLOR=3D"#0000=
FF"><B>to</B></FONT> <FONT COLOR=3D"#0000FF">selection<BR>
</FONT> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=3D"#0000FF"><B>=
if</B></FONT> <FONT COLOR=3D"#0000FF">class</FONT> <FONT COLOR=3D"#0000FF"><B>of=
</B></FONT> <FONT COLOR=3D"#0000FF">item</FONT> 1 <FONT COLOR=3D"#0000FF"><B>of<=
/B></FONT> <FONT COLOR=3D"#408000">theEvents</FONT> &#8800; <FONT COLOR=3D"#0000=
FF">event</FONT> <FONT COLOR=3D"#0000FF"><B>then</B></FONT> <FONT COLOR=3D"#0000=
FF"><B>error</B></FONT> <FONT COLOR=3D"#0000FF">number</FONT> -128<BR>
&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=3D"#0000FF"><B>on</B></FONT> <FONT COLOR=3D=
"#0000FF"><B>error<BR>
</B></FONT> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=3D"#0000FF"=
>beep</FONT> 2<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=3D"#0000FF">displ=
ay dialog</FONT> &quot;You must select a list of calendar events in a Custom=
View or Search Results panel.&quot; <FONT COLOR=3D"#0000FF">buttons</FONT> {&=
quot;Cancel&quot;} <FONT COLOR=3D"#0000FF">default button</FONT> 1 <FONT COLOR=
=3D"#0000FF">with icon</FONT> 0<BR>
&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=3D"#0000FF"><B>end</B></FONT> <FONT COLOR=
=3D"#0000FF"><B>try<BR>
</B></FONT> &nbsp;&nbsp;&nbsp;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=3D"#0000FF"><B>repeat</B></FONT> <FONT CO=
LOR=3D"#0000FF"><B>with</B></FONT> <FONT COLOR=3D"#408000">i</FONT> <FONT COLOR=3D=
"#0000FF"><B>from</B></FONT> 1 <FONT COLOR=3D"#0000FF"><B>to</B></FONT> (<FONT=
COLOR=3D"#0000FF">count</FONT> <FONT COLOR=3D"#408000">theEvents</FONT>)<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=3D"#0000FF"><B>re=
peat</B></FONT> 1 <FONT COLOR=3D"#0000FF"><B>times<BR>
</B></FONT> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;<FONT COLOR=3D"#0000FF"><B>set</B></FONT> <FONT COLOR=3D"#408000">theEvent</F=
ONT> <FONT COLOR=3D"#0000FF"><B>to</B></FONT> <FONT COLOR=3D"#0000FF">item</FONT=
> <FONT COLOR=3D"#408000">i</FONT> <FONT COLOR=3D"#0000FF"><B>of</B></FONT> <FON=
T COLOR=3D"#408000">theEvents<BR>
</FONT> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<=
FONT COLOR=3D"#0000FF"><B>if</B></FONT> <FONT COLOR=3D"#0000FF">class</FONT> <FO=
NT COLOR=3D"#0000FF"><B>of</B></FONT> <FONT COLOR=3D"#408000">theEvent</FONT> &#=
8800; <FONT COLOR=3D"#0000FF">event</FONT> <FONT COLOR=3D"#0000FF"><B>then</B></=
FONT> <FONT COLOR=3D"#0000FF"><B>exit</B></FONT> <FONT COLOR=3D"#0000FF"><B>repe=
at</B></FONT> --<FONT COLOR=3D"#4C4D4D"><I>(skip if non-event in mixed view)<B=
R>
</I></FONT> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;<FONT COLOR=3D"#0000FF"><B>set</B></FONT> {<FONT COLOR=3D"#408000">theName</F=
ONT>, <FONT COLOR=3D"#408000">startTime</FONT>, <FONT COLOR=3D"#408000">theCateg=
ories</FONT>} <FONT COLOR=3D"#0000FF"><B>to</B></FONT> <FONT COLOR=3D"#408000">t=
heEvent</FONT>'s {<FONT COLOR=3D"#0000FF">subject</FONT>, <FONT COLOR=3D"#0000FF=
">start time</FONT>, <FONT COLOR=3D"#0000FF">category</FONT>}<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FO=
NT COLOR=3D"#0000FF"><B>set</B></FONT> <FONT COLOR=3D"#408000">startDate</FONT> =
<FONT COLOR=3D"#0000FF"><B>to</B></FONT> <FONT COLOR=3D"#408000">startTime</FONT=
> - (<FONT COLOR=3D"#0000FF">time</FONT> <FONT COLOR=3D"#0000FF"><B>of</B></FONT=
> <FONT COLOR=3D"#408000">startTime</FONT>)<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR=
>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FO=
NT COLOR=3D"#0000FF">make</FONT> <FONT COLOR=3D"#0000FF">new</FONT> <FONT COLOR=3D=
"#0000FF">task</FONT> <FONT COLOR=3D"#0000FF">with properties</FONT> {<FONT CO=
LOR=3D"#0000FF">name</FONT>:<FONT COLOR=3D"#408000">theName</FONT>, <FONT COLOR=3D=
"#0000FF">due date</FONT>:<FONT COLOR=3D"#408000">startDate</FONT>, <FONT COLO=
R=3D"#0000FF">category</FONT>:<FONT COLOR=3D"#408000">theCategories</FONT>}<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=3D"#0000FF"><B>en=
d</B></FONT> <FONT COLOR=3D"#0000FF"><B>repeat<BR>
</B></FONT> &nbsp;&nbsp;&nbsp;<FONT COLOR=3D"#0000FF"><B>end</B></FONT> <FONT=
COLOR=3D"#0000FF"><B>repeat<BR>
</B></FONT> &nbsp;&nbsp;&nbsp;--<FONT COLOR=3D"#4C4D4D"><I> set displayed are=
a of main window to tasks area<BR>
</I></FONT> &nbsp;&nbsp;&nbsp;<FONT COLOR=3D"#0000FF">beep</FONT> 2<BR>
&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=3D"#0000FF">display dialog</FONT> &quot;D=
one!&quot;<BR>
<FONT COLOR=3D"#0000FF"><B>end</B></FONT> <FONT COLOR=3D"#0000FF"><B>tell<BR>
</B></FONT><BR>
-----------------------------------<BR>
<BR>
-- <BR>
Paul Berkowitz<BR>
MVP Entourage<BR>
Entourage FAQ Page: <a href=3D"http://www.entourage.mvps.org/toc.html">&lt;ht=
tp://www.entourage.mvps.org/toc.html&gt;</a><BR>
AppleScripts for Entourage: <a href=3D"http://macscripter.net/scriptbuilders/=
">&lt;http://macscripter.net/scriptbuilders/&gt;</a> <BR>
<BR>
Please &quot;Reply To Newsgroup&quot; to reply to this message. Emails will=
be ignored.<BR>
<BR>
PLEASE always state which version of Entourage you are using - 2001 or X. I=
t's often impossible to answer your questions otherwise.<BR>
<BR>
<BR>
<FONT COLOR=3D"#0000FF">&gt; From: Paul W &lt;puddy.thisisspam@soisthis.paulw=
ilde.net&gt;<BR>
&gt; Newsgroups: microsoft.public.mac.office.entourage<BR>
&gt; Date: Sat, 17 Jan 2004 21:09:07 +0000<BR>
&gt; Subject: Re: Create Tasks from events <BR>
&gt; <BR>
&gt; Thanks for your reply, Paul - I was a bit sparse with my requirement (=
!)<BR>
&gt; <BR>
&gt; It goes like this :<BR>
&gt; <BR>
&gt; Requirement : take a list of events and make a task for each one.<BR>
&gt; <BR>
&gt; Description of tasks : create a task for each event - set start date,<=
BR>
&gt; subject, no end date, category.<BR>
&gt; <BR>
&gt; Expected result : task with due date being event start date, category =
event<BR>
&gt; category and subject event subject, other fields to be task default.<B=
R>
&gt; <BR>
&gt; Extra info : the list of events is a study calendar, no events overlap=
, no<BR>
&gt; events have the same start date, no events have an end date.<BR>
&gt; <BR>
&gt; I'm using entourage x.<BR>
&gt; <BR>
&gt; Thanks.<BR>
&gt; <BR>
&gt; Paul W.<BR>
&gt; <BR>
</FONT><FONT COLOR=3D"#008000">&gt;&gt; On 1/17/04 12:18 PM, in article<BR>
&gt;&gt; BC2F4916.5079%puddy.thisisspam@soisthis.paulwilde.net, &quot;Paul =
W&quot;<BR>
&gt;&gt; &lt;puddy.thisisspam@soisthis.paulwilde.net&gt; wrote:<BR>
&gt;&gt; <BR>
</FONT><FONT COLOR=3D"#FF0000">&gt;&gt;&gt; Hi,<BR>
&gt;&gt;&gt; <BR>
&gt;&gt;&gt; Does anyone know how I can automatically create tasks from a l=
ist of events<BR>
&gt;&gt;&gt; ?<BR>
&gt;&gt;&gt; <BR>
</FONT><FONT COLOR=3D"#008000">&gt;&gt; It would have to be done by AppleScri=
pt. But there are differences between<BR>
&gt;&gt; tasks and events, you know; and you're not telling us what you'd w=
ant to do<BR>
&gt;&gt; about these differences.<BR>
&gt;&gt; <BR>
</FONT><FONT COLOR=3D"#0000FF">&gt; <BR>
&gt; <BR>
</FONT></SPAN></FONT>
</BODY>
</HTML>


--B_3157228054_10480203--


Re: Create Tasks from events by Paul

Paul
Sun Jan 18 03:53:03 CST 2004

> This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

--B_3157264384_48993
Content-type: text/plain; charset="US-ASCII"
Content-transfer-encoding: 7bit

Paul,

Thank you very much for this.

Paul W.


>OK, it's pretty simple. (...)

--B_3157264384_48993
Content-type: text/html; charset="US-ASCII"
Content-transfer-encoding: quoted-printable

<HTML>
<HEAD>
<TITLE>Re: Create Tasks from events </TITLE>
</HEAD>
<BODY>
<FONT FACE=3D"Verdana"><SPAN STYLE=3D'font-size:12.0px'>Paul,<BR>
<BR>
Thank you very much for this.<BR>
<BR>
Paul W.<BR>
<BR>
<BR>
&gt;OK, it's pretty simple. (...)</SPAN></FONT>
</BODY>
</HTML>


--B_3157264384_48993--