• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Entourage close main window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Entourage close main window


  • Subject: Re: Entourage close main window
  • From: JollyRoger <email@hidden>
  • Date: Sat, 16 Mar 2002 08:48:14 -0600

On 3/15/2002 9:34 PM, "Paul Berkowitz" <email@hidden> wrote:

> On 3/15/02 6:53 PM, "JollyRoger" <email@hidden> wrote:
>
>> Can someone tell me why this does not work?
>>
>> -- begin script
>> -- you need Microsoft Entourage installed to run this script
>> property pCallerName : ""
>>
>> try
>> tell application "Finder" to set foundApp to application file id "OPIM"
>> tell application "Finder" to set pCallerName to name of (foundApp)
>> end try
>>
>> tell application pCallerName
>> activate
>> close +class mnWn;
>> end tell
>> -- end script
>>
>> I get this error:
>>
>> Microsoft Entourage got an error: main window doesn't understand the close
>> message.
>>
>
> Try this for the second part:
>
> tell application pCallerName
> activate
> close <<property mnWn>>
> end tell
>
> Even though it compiles as <<class mnWn>>, there's evidently some difference
> "under the skin", because it works, whereas typing <<class mnWn>> doesn't.
> Maybe Jon Pugh knows how this works.

Is there any way to prevent this from happening so that I don't have to edit
this line each and every time I compile the script? Every time I compile he
script it changes back to class. What a pain!

> BTW, since you're being so careful to use raw code in case people change the
> name of the app,or have more than one version, you should be aware that the
> first part of your script won't protect your user from the wrong version
> from trying to open if they have more than one with the same name. In
> particular - the only real-life instance would normally be if they have both
> Entourage 2001 and X. The file system in OS XS easily gets confused and will
> open the most recently used version (e.g. 2001 on Classic), even if it's not
> the one you want.

This is Apple's bug - not mine. Let them fix it.

> You might do better to make the first part of the script:
>
> try
> tell application "Finder" to set foundApp to application file id "OPIM"
> set pCallerName to foundApp as alias as string -- whole path name
> end try
>
> (Of course the first line might still find the "wrong" one. There are
> routines you can use to specify the "right" version.)

Yes, that would just give me the path to whichever the file system found
first, which wouldn't solve the problem.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Entourage close main window
      • From: Paul Berkowitz <email@hidden>
References: 
 >Re: Entourage close main window (From: Paul Berkowitz <email@hidden>)

  • Prev by Date: Re: FADE DEAD
  • Next by Date: Re: Entourage close main window
  • Previous by thread: Re: Entourage close main window
  • Next by thread: Re: Entourage close main window
  • Index(es):
    • Date
    • Thread