• 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: Display Dialog
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Display Dialog


  • Subject: Re: Display Dialog
  • From: Paul Berkowitz <email@hidden>
  • Date: Fri, 21 Sep 2001 12:42:51 -0700

On 9/19/01 8:19 AM, "email@hidden" <> wrote:

> I wonder how I get the dialog window to the front of all other running
> applications??
>

Either put in inside the tell block of the application that you know will be
in front (if you know what that will be), or better don't put it in a tell
block at all. That way it should be within 'tell current application'
context. I don't use applets much, so I don't know if perhaps that doesn't
work for applets - it may be in the applet's context , which could be in the
back. So, to be foolproof ;

tell application "Finder"
try
set frontProcName to name of first process whose frontmost is
true
on error -- Finder doesn't think it's a process, so errors if it's
in front
set frontProcName to "Finder"
end try
end tell

tell application frontProcName
display dialog "Boo! Here I am!" with icon 1
end tell


You could also do the same thing, and it will work in OS 10.0.x where the
above won't, by

set frontProcName to (path to frontmost application as string)

tell application frontProcName
display dialog "Boo! Here I am!" with icon 1
end tell



--
Paul Berkowitz


References: 
 >Display Dialog (From: Styrström)

  • Prev by Date: Re: ACGI Timeout again
  • Next by Date: Re: Display Dialog (addendum)
  • Previous by thread: Re: Display Dialog
  • Next by thread: Re: Display Dialog (addendum)
  • Index(es):
    • Date
    • Thread