Re: iCal Hide/Show Calendar
Re: iCal Hide/Show Calendar
- Subject: Re: iCal Hide/Show Calendar
- From: Axel Luttgens <email@hidden>
- Date: Fri, 9 Jul 2010 10:09:03 +0200
Le 9 juil. 2010 à 01:50:56, Gil Dawson a écrit :
> Is there a way for an AppleScript program to hide/show a particular calendar in iCal V4.0.3 (Snow Leopard 10.6.4)?
>
> There's a checkbox right next to the name of the calendar that does exactly what I want -- with the mouse. I'd like to control that checkbox from an AppleScript program.
>
> The iCal dictionary for a calendar doesn't seem to have a property corresponding to that checkbox:
>
> calendar n : This class represents a calendar.
> [...]
>
> The UI Element Inspector identifies that particular checkbox as follows:
>
> <AXApplication: “iCal”>
> <AXWindow: “iCal”>
> <AXScrollArea>
> <AXOutline>
> <AXRow>
> <AXCheckBox: “”>
> [...]
>
> Is there perhaps a way to translate this information into, say, a System Events command?
Hello Gil,
Indeed, iCal's dictionary doesn't seem to supply the needed functionality.
Feature request? ;-)
Wrt UI scripting, this one works here:
tell application "System Events"
tell application process "iCal"
tell front window
-- Don't know whether this always is the third scroll area.
-- If yes, just tell scroll area 3 and avoid localization.
tell first item of (scroll areas whose description of first outline is "Liste des calendriers")
tell outline 1
-- If calendar names are not unique,
-- one would need to be somewhat
-- more subtle. ;-)
tell first item of (rows whose value of text field 1 is "Personnel")
click checkbox 1
end tell
end tell
end tell
end tell
end tell
end tell
HTH,
Axel
_______________________________________________
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