I am using the following script in my application to set an event in iCal.
on run {theCal, eventName, dateSTring, theDesc}
set dateText to dateSTring
set theDate to date dateText
tell application "iCal"
tell calendar theCal
make new event at end of events with properties {summary:eventName, description:theDesc, start date:theDate}
end tell
end tell
end run
This has been working perfectly but after installing Snow Leopard the script fails to add the event to the calendar.
Does anyone know how to fix this?
c("Privat", "TestEvent", "10.10.2010", "Blafasel")
on c(theCal, eventName, dateSTring, theDesc)
set dateText to dateSTring
set theDate to date dateText
tell application "iCal"
tell calendar theCal
make new event at end of events with properties {summary:eventName, description:theDesc, start date:theDate}
end tell
end tell
end c
So there is noting wrong with your iCal-Part… so far…
It turns out its the date format I was using. I have that fixed but I can’t get the time to set properly. Apparently, there is now, in Snow Leopard, a “time” property that sets the time of the event. I have not been able to figure out the correct way to use this. No matter what I try the time of the event remains 12:00 AM. Any suggestions?