I am in need of a script that will allow me to extract only those events in Palm Desktop that are of a particalur category in Palm Desktop for a range of dates determined by the user. So far I am able to get a list of the events and of the category IDs but am having NO luck being able to compare these 2 lists and extract only those events that meet both criteria (are in the date range and have the proper category id).
So far I have the following:
set myHome to "MacsHeadRoom:Users:treid:Documents:"
display dialog "What year would you like to choose?" default answer ""
set myYear to the text returned of result
display dialog "What month would you like to choose?" default answer ""
set myMonth to the text returned of result
tell application "Palm Desktop"
set myGigs to (category id 11)
set myEvents to every event
repeat with i in myEvents
if primary category of i = myGigs then
if start time of i contains (myYear) & (myMonth) then
set beginTime to start time of i
set gigName to title of i
set myStuff to (gigName & " " & beginTime) as string
tell application "TextEdit"
activate
if not (exists document 1) then
make new document at beginning with properties {name:"NewGigs"}
set last paragraph of document 1 to (myStuff & return & return)
else
set last paragraph of document 1 to (myStuff & return & return)
end if
end tell
end if
end if
end repeat
end tell
Anyone have any ideas?
Todd