Re: Scripting Palm Desktop - one last question
Re: Scripting Palm Desktop - one last question
- Subject: Re: Scripting Palm Desktop - one last question
- From: Irwin Poche <email@hidden>
- Date: Sat, 13 Oct 2001 21:57:50 -0500
Jason,
Thanks for your example. I would have given up by now without it. If you
can, please answer one last question.
When setting categories (see below), I find that only the specific instance
of repeated instances gets set. This greatly increases the effort to
re-categorize an entire calendar with lots of repeating items. Done
manually in the Palm Desktop, a dialog is presented to choose current,
future, or all instances.
Is there a scriptable way to state that all occurrences are to be set ?
Thanks again,
-Irwin
tell application "Palm Desktop"
repeat dayCount times
set theDay to my format_date_using(date0, "/", {"MM", "DD", "YYYY"})
--this loop logs appointments without categories
set upperlimit to count of every event on day theDay
repeat with x from 1 to upperlimit
set event_title to title of event x of day theDay
set event_cat to primary category of event x of day theDay
if id of event_cat is -1 then
set newCat to category (my kwLookup(event_title, KWlist)
set primary category of event x of day theDay to category
newCat
end if
end repeat
--this loop finds and logs event banners without categories
set upperlimit to count of every day event on day theDay
repeat with x from 1 to upperlimit
set event_title to title of day event x of day theDay
set event_cat to primary category of day event x of day theDay
if id of event_cat is -1 then
set newCat to my kwLookup(event_title, KWlist)
set primary category of day event x of day theDay to category
newCat
end if
end repeat
set date0 to date0 + 1 * days
end repeat
end tell
===============================