refresh iCal menu command

HELP!

I’m new to this whole Applescript stuff.

On start up I wish to activate iCal (I can do this bit) and then use the menu command ‘Refresh’ to update the calendar I have subscribed to.

I’ve tried using click menu but it does not work. Anyone know the answer?

Thanks

LEE

tell application "iCal" to reload calendars"

will update your calendars, and doesn’t require GUI scripting (activating the app, selecting a menu item, etc.)

Camelot,

I have tried your script and it appears to work. One question, it does not refresh the date and time in the last updated section in the info palette. Does this mean that it has requested the latest .ics file from my server?

Thanks

Lee

The script below does not work in my case. Do I need to give a reference? How do I reference all calendars? Thanks! Luke


tell application "iCal"
	reload calendars
	activate
end tell

I found a way to cheat… Anyway, if someone knows how to use “reload calendars”?

tell application "System Events"
	tell process "iCal"
		keystroke "R" using {command down, shift down}
	end tell
end tell