iCal event script not working in Snow Leopard

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?

Just tried this using 10.6.1… works

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?

Hi,

the way to parse date strings has been changed in Snow Leopard.
See AppleScript Release Notes 10.6

Thanks! I’ll check it out.