Re: Calendar Views, Entourage
Re: Calendar Views, Entourage
- Subject: Re: Calendar Views, Entourage
- From: Paul Berkowitz <email@hidden>
- Date: Wed, 23 Mar 2005 11:22:41 -0800
On 3/23/05 10:12 AM, "Todd Geist" <email@hidden> wrote:
>
> Is there anyway to get information on which calendar sub view is displayed
> in a Calendar Area? For example I would like to know if Day, Week, Work
> Week, Or month is currently displayed.
No. The Calendar is rather poorly scriptable, really not at all, in
Entourage. Calendar events are very scriptable, but still missing many
properties such as time zone, plus everything to do with invitations
(attendees, etc.) But he calendar UI is not scriptable.
However you _can_ command the calendar via GUI scripting, as long as you
stick to menu items, not buttons. But you can't get the state. There doesn't
seem to be a menu item property in System Events corresponding to the
checkmark next to the operative item - 'selected' doesn't work:
tell application "System Events"
tell process "Microsoft Entourage"
selected of menu item "Month" of menu "Calendar" of menu bar item
"Calendar" of menu bar 1
end tell
end tell
--> undefined
And since the buttons aren't available you can't check which one's selected
is true or value is 1 (if that would even work).
You could just
tell application "Microsoft Entourage"
activate
if displayed area of main window is not calendar area then
set displayed area of main window to calendar area
end if
end tell
tell application "System Events"
tell process "Microsoft Entourage"
click menu item "Month" of menu "Calendar" of menu bar item
"Calendar" of menu bar 1
end tell
end tell
If it's already set to Month, no harm done - nothing happens. Note that you
_must_ activate Entourage for the view to change. U fortunately, if the
calendar is set to a custom view, there's no way to change the view to the
Calendar itself since that, most unusually, is not available by menu but
only by button. (That should be changed too.)
It should not have to be done by GUI scripting. I know MS is planning to
expand Entourage's scriptability and I think they know that the calendar
scripting is poor. Please let them know you'd like it improved, via
Help/Send Feedback (in the Help menu). The more who ask, the better the
chances of improving its priority.
--
Paul Berkowitz
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden