Re: Display Dialog
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