Moving from Microsoft Office VBA to AppleScript:
MacTech's Guide to Making the Transition
Introduction
|
Table of Contents
Page Prev and Page Next buttons at bottom of the page.
|
April, 2007
Page 135
(*set the task's due date to just the date
(i.e., midnight) of the event's start time*)
set time of theStartTime to 0
(* remove or comment out (--) the next line if you
don't want the location added to the title *)
if theLocation "" then set theTitle to ¬
(theTitle & "(" & theLocation & ")")
(*if it's not a recurring task, must omit 'recurring'
from properties*)
if ifRecurring then
set newTask to make new task with properties {name:¬
theTitle, due date:theStartTime, completed:false, recurring:¬
true, recurrence:theRecurrence, category:¬
theCategories, project list:theProjects, content:theNotes}
else
set newTask to make new task with properties {name:¬
theTitle, due date:theStartTime, completed:false, category:¬
theCategories, project list:theProjects, content:theNotes}
end if
(*sets the task's reminder to the same as the original
event's reminder: or comment out the line with --
to not duplicate the reminder *)
if hasReminder then set remind date and time ¬
of newTask to theReminder
link newTask to theEvent
repeat with i from 1 to (count theLinks)
set theLink to item i of theLinks
try
link theLink to newTask
end try
end repeat
(* optionally delete the event by uncommenting
< Previous Page Next Page>
- SPREAD THE WORD:
- Slashdot
- Digg
- Del.icio.us
- Newsvine