Automate iCal printing

Disclosure: I am a complete n00b at scripting (and OSX for that matter).

Basically, I have a program (Alarm Clock Pro) that allows me to easily set alarms for waking up, etc. It can also run a file or script at that time. I would like to make something that will print out my iCal agenda for the day, using the list view for that day.

My suspicion is that this should be easy using Applescript to press buttons etc, but I have no idea. If it is too difficult to get the current date entered, just adding in the current day is fine.

Kthx

Hi,

I wrote this a while ago. I hope it helps:

-- Print Today's iCal
-- Applescript -- John Maisey 9 October 2006
-- [url=http://www.nhoj.co.uk]www.nhoj.co.uk[/url]

tell application "iCal"
	view calendar at (my (current date))
	switch view to day view
	activate
	tell application "System Events"
		keystroke "p" using command down
		delay 1 -- (seconds) Edit this delay if needed.
		keystroke return
		delay 2 -- (seconds) Edit this delay if needed.
		keystroke return
	end tell
	quit -- Or perhaps not?
end tell

John M

Perfect. Thanks