Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"ask for text" action in Apple automator does not receive focus automatically

I wrote an Service using Apple's Automator. The first action is an "Ask for Text" action. However, when I trigger the shortcut to initiate the service, the modal asking for text pops up, but it does not have focus. I have to use the mouse to click on it.

Is there any way to have automator open this window with the focus on the text input?

like image 219
pocketfullofcheese Avatar asked Aug 30 '12 17:08

pocketfullofcheese


1 Answers

Add some applescript to the top of your workflow with the following code. Just replace myapp with your app name

tell application "myapp"
activate
end tell
like image 184
David Steer Avatar answered Oct 02 '22 18:10

David Steer