Title: Re: Script acts really weird...
On 11/3/02 1:02 PM, "Bryan Harris" <[EMAIL PROTECTED]> wrote:
>
>
> I just noticed something. Whenever I'm in a custom view in the address book
> and run the following script, 'rage X bounces around from view to view
> seemingly randomly until it settles with the mail folder list on the left
> and "Address Book Views" in the right pane. Very weird.
>
> Any ideas why? Here's the script:
>
> tell application "Microsoft Entourage"
> open main window
> set displayed feature of main window to in box folder
> end tell
>
> TIA.
>
In Entourage X, 'main window' is simply the frontmost browser window. If you have no browser windows open at all , 'open' will still open one (very handy, since usually referring to a non-existent object will error.) If there are already one or more browser windows open, 'open' will act like 'select', bringing the frontmost browser to the very front (i.e. displacing other windows such as message windows or open groups, contacts, etc.). Otherwise it won't do anything: it doesn't bring a browser displaying Mail in front of one displaying Address Book, for example.
If your frontmost browser is displaying Address Book, asking it to set its displayed feature to a mail folder is indeed going to drive it nuts. First you should set its displayed area to mail area:
set displayed area of main window to mail area
set displayed feature of main window to in box folder
That should avoid all the bouncing. You might even want to try this:
try
set mailWindow to first browser window whose displayed area is mail area
select mailWindow
on error -- there's no browser window set to mail at the moment
open main window -- opens, or brings current front browser to front
set displayed area of main window to mail area
set mailWindow to main window
end try
set displayed feature of mailWindow to in box folder
'browser window' class, and its property 'displayed area' are new features in Entourage X. They are extremely useful: otherwise you could never set the main window to show calendar, tasks list, or notes list. Now we just need calendar area windows to allow displayed features of 'month view','week view' etc. , which you still can't do, and maybe 'incomplete view' , etc. as displayed feature of tasks area windows too.
--
Paul Berkowitz
MVP Entourage
PLEASE always state which version of Entourage you are using - 2001 or X. It's often impossible to answer your questions otherwise.
- Script acts really weird... Bryan Harris
- Re: Script acts really weird... Paul Berkowitz
- Re: Script acts really weird... Bryan Harris
- Re: Script acts really weird... Eric Hildum
