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 "default reminder" 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> "Microsoft Entourage"<BR>
<FONT COLOR=3D"#0000FF"><B>try<BR>
</B></FONT> <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> <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> ≠ <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>
<FONT COLOR=3D"#0000FF"><B>on</B></FONT> <FONT COLOR=3D=
"#0000FF"><B>error<BR>
</B></FONT> <FONT COLOR=3D"#0000FF"=
>beep</FONT> 2<BR>
<FONT COLOR=3D"#0000FF">displ=
ay dialog</FONT> "You must select a list of calendar events in a Custom=
View or Search Results panel." <FONT COLOR=3D"#0000FF">buttons</FONT> {&=
quot;Cancel"} <FONT COLOR=3D"#0000FF">default button</FONT> 1 <FONT COLOR=
=3D"#0000FF">with icon</FONT> 0<BR>
<FONT COLOR=3D"#0000FF"><B>end</B></FONT> <FONT COLOR=
=3D"#0000FF"><B>try<BR>
</B></FONT> <BR>
<BR>
<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>
<FONT COLOR=3D"#0000FF"><B>re=
peat</B></FONT> 1 <FONT COLOR=3D"#0000FF"><B>times<BR>
</B></FONT> &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> <=
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> &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>
<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>
<BR=
>
<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>
<FONT COLOR=3D"#0000FF"><B>en=
d</B></FONT> <FONT COLOR=3D"#0000FF"><B>repeat<BR>
</B></FONT> <FONT COLOR=3D"#0000FF"><B>end</B></FONT> <FONT=
COLOR=3D"#0000FF"><B>repeat<BR>
</B></FONT> --<FONT COLOR=3D"#4C4D4D"><I> set displayed are=
a of main window to tasks area<BR>
</I></FONT> <FONT COLOR=3D"#0000FF">beep</FONT> 2<BR>
<FONT COLOR=3D"#0000FF">display dialog</FONT> "D=
one!"<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"><ht=
tp://www.entourage.mvps.org/toc.html></a><BR>
AppleScripts for Entourage: <a href=3D"
http://macscripter.net/scriptbuilders/=
"><
http://macscripter.net/scriptbuilders/></a> <BR>
<BR>
Please "Reply To Newsgroup" 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">> From: Paul W <puddy.thisisspam@soisthis.paulw=
ilde.net><BR>
> Newsgroups: microsoft.public.mac.office.entourage<BR>
> Date: Sat, 17 Jan 2004 21:09:07 +0000<BR>
> Subject: Re: Create Tasks from events <BR>
> <BR>
> Thanks for your reply, Paul - I was a bit sparse with my requirement (=
!)<BR>
> <BR>
> It goes like this :<BR>
> <BR>
> Requirement : take a list of events and make a task for each one.<BR>
> <BR>
> Description of tasks : create a task for each event - set start date,<=
BR>
> subject, no end date, category.<BR>
> <BR>
> Expected result : task with due date being event start date, category =
event<BR>
> category and subject event subject, other fields to be task default.<B=
R>
> <BR>
> Extra info : the list of events is a study calendar, no events overlap=
, no<BR>
> events have the same start date, no events have an end date.<BR>
> <BR>
> I'm using entourage x.<BR>
> <BR>
> Thanks.<BR>
> <BR>
> Paul W.<BR>
> <BR>
</FONT><FONT COLOR=3D"#008000">>> On 1/17/04 12:18 PM, in article<BR>
>> BC2F4916.5079%puddy.thisisspam@soisthis.paulwilde.net, "Paul =
W"<BR>
>> <puddy.thisisspam@soisthis.paulwilde.net> wrote:<BR>
>> <BR>
</FONT><FONT COLOR=3D"#FF0000">>>> Hi,<BR>
>>> <BR>
>>> Does anyone know how I can automatically create tasks from a l=
ist of events<BR>
>>> ?<BR>
>>> <BR>
</FONT><FONT COLOR=3D"#008000">>> It would have to be done by AppleScri=
pt. But there are differences between<BR>
>> tasks and events, you know; and you're not telling us what you'd w=
ant to do<BR>
>> about these differences.<BR>
>> <BR>
</FONT><FONT COLOR=3D"#0000FF">> <BR>
> <BR>
</FONT></SPAN></FONT>
</BODY>
</HTML>
--B_3157228054_10480203--