Search code examples
applescriptautomator

How «Wait until application launch» applescript?


How to write the code correctly?

I run the application Photoshop in the automator I'm waiting for it to fully load Then I press 10 times Tab and press Enter.

I've tried that:

enter image description here

Looks like that part doesn't work. Because Tab starts to click before the application is fully loaded. What's wrong? Thanks!

repeat until application launch
delay 0.5 end repeat delay 0.5

Solution

  • This is the answer:

    tell application "Your app"
        launch
        activate
    end tell