iCal todos: answer and question
iCal todos: answer and question
- Subject: iCal todos: answer and question
- From: brmic <email@hidden>
- Date: Tue, 3 Dec 2002 12:30:39 +0100
hi sam
you might try this
--------------------------<script>
tell application "iCal"
-- for choice of calendar only
(* set theCals to calendars whose writable is true
repeat with i from 1 to count of theCals
copy title of item i of theCals to end of iCalendars
end repeat
set theChoice to choose from list iCalendars with prompt "Choose the
Calendar to use" OK button name "Choose" without multiple selections
allowed and empty selection allowed
if theChoice is not false then
set CC to item 1 of theChoice
set i to 1
repeat with anItem in iCalendars
if item i of iCalendars is equal to CC then
set theNum to i
exit repeat
end if
set i to i + 1
end repeat
set theCalChoice to calendar i
end if *)
set theCalChoice to calendar 1 -- assuming this is calendar work
set thetodos to todos of theCalChoice
repeat with ii from 1 to count of thetodos
if completion date of item ii of thetodos exists then
else
copy summary of item ii of thetodos to end of dolist
-- copy completion date of item ii of thetodos to end of donelist
-- get properties of item ii of thetodos
end if
end repeat
-- set td to choose from list dolist
-- and so on, depending on what you want
end tell
-------------</script>
also check out :
Jesse Shanks
Writer & Web Developer
http://www.blankreb.com
email@hidden
author of the superb iCal services pack, on whose Quick Todo most of
the script is based. (i merely rearranged it and made it a bit clumsier
to match my skill)
by the way: can anyone tell me why this reminder script, set to replace
mailInfo.applescript and mailScript.applescript in iCal and iCal helper
will not work? anyone else tried this?:
--------------------------------------------- <script>
set mysubject to "$1" -- should be provided by iCal according to the
original mailScript.applescript
set mybody to "$2"
my attention(mysubject, mybody)
on attention(mysubject, mybody)
tell application "Finder"
set sub to mysubject as string
set bod to mybody as string
set due to the current date
display dialog "Attention! Please take care of this:" & return &
return & mysubject & mybody ,
& return & "Due date:" & due ,
with icon caution buttons {"Later", "OK"} default button 2
if the button returned of the result is "Later" then
display dialog " When do you think you will be ready for this ?" &
return buttons {"15 minutes", "4 hours", "tomorrow"} default button 3
if the button returned of the result is "15 minutes" then
delay 10 --900 -- set to 10 seconds for testing
beep
else if the button returned of the result is "4 hours" then
delay 14400
else if the button returned of the result is "tomorrow" then
delay 86400
end if
display dialog "Attention! You'd better take care of this:" & return
& return & mysubject & mybody ,
& return & "Due date:" & due ,
with icon caution buttons {"Later", "OK"} default button 2
if the button returned of the result is "Later" then
beep
set mysubject to sub
set mybody to bod
my attention(mysubject, mybody)
else if the button returned of the result is "OK" then
beep
return false
end if
else if the button returned of the result is "OK" then
beep
return
end if
end tell
end attention
</script>---------------------------------------------
thanks for taking an interest
markus
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.