selecting a calendar in iCal on Lion? [ to export selected calendars to an ICS file ]
selecting a calendar in iCal on Lion? [ to export selected calendars to an ICS file ]
- Subject: selecting a calendar in iCal on Lion? [ to export selected calendars to an ICS file ]
- From: Nathan Bailey <email@hidden>
- Date: Sun, 09 Sep 2012 17:12:15 +1000
I have a script:
set myNames to {"Work A", "Work B"}
repeat with myName in myNames
activate calendar myName
tell application "System Events"
tell process "iCal"
click menu item "Export…" of menu "Export" of menu item "Export"
of menu "File" of menu bar item "File" of menu bar 1
click button "Export" of sheet 1 of window 1
end tell
end tell
end repeat
Although "activate calendar myName" is accepted, it doesn't do
anything, ie. if I run this script with "Home" as the currently
selected calendar, I end up with two copies of "Home" being saved,
rather than either Work A or Work B.
I can't work out how to graphically address the "[Calendars]"
button/list in the toolbar to manually select the calendar I want
(automator mentions the toolbar but this doesn't seem addressable in
AS?)
How can I select a calendar in iCal on Lion?
thanks!
Nathan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden