How can you make an applescript display dialog window be the front-most window
I wrote an AppleScript that I compiled as an application and it contains a "display dialog" command essentially saying "OK to proceed" - you're supposed to click on the OK button and it then goes about it's business. However, whenever that script is run the dialog box generated is *always* hidden so it looks like things have hung. The dialog box can't be revealed via Expose and, curiously nothing in my hidden-by-default dock is bouncing although when I reveal the dock the AppleScript icon for the app is indeed bouncing. How can I make the "display dialog" command in my AppleScript do the obvious thing i.e. display the darn dialog box?
MacBook Pro 16″, macOS 14.7