How can I force a dialog to open in the front in AppleScript?
Asked by
lefteh (
9434)
June 18th, 2008
I just can’t seem to force my dialog to open in front of Firefox.
Here‘s the code.
Observing members:
0
Composing members:
0
4 Answers
Each window on the Mac belongs to an application. Probably the easiest way to raise the alert window is to raise the application posting it. There is AppleScript verbiage to do this, something like:
tell application “Xyz” to activate
If the dialog is posted by an AppleScript ‘display dialog’ command, then the dialog is owned by the app named by the innermost ‘tell’ block containing the display dialog statement.
—from an Apple discussion
—
I didn’t see any “activate” mentioned in your code snippet, so I hope that helps.
Robmandu: Your suggestion, even though it didn’t work quite right, led me to a solution that worked.
Thanks!
@lefteh
Would you mind sharing what worked? I’m curious and it might help someone that stumbles upon this page from Google.
Answer this question
This question is in the General Section. Responses must be helpful and on-topic.