I've created an application with AppleScript in Automator.
I've created a Service in Automator which launches the aforementioned app.
The Service is triggered by a keyboard shortcut.
The problem is that upon launch, the application's dialog box has a light gray top bar. I have to click anywhere on the dialog for the dialog to turn to the darker gray, which shows that the app is now selected.
Is it possible for my application to do this automatically?
Best Answer
Have a look at the
activate
command in the AppleScript Language Guide Commands Reference.I'd add
activate me
after the start of theon run
handler.