Question On How to Script Opening and Monitoring an App

Hi, this is the first time I’ve posted to this forum. I’m very new to Apple Script, and I’m still learning. I have a basic question on how to properly call an application to open from my script, then monitor from my script for when that application that I call opens. Finally, once that application is active, I would like to close/end my script. The application that I would call would reside in the user’s Downloads folder (say for example, it was just downloaded from a URL). Thank you for any assistance. I can post code if necessary, but it’s a mess (again very new to this). :slight_smile:

Model: MacBook Air
AppleScript: 2.5
Browser: Safari 537.36
Operating System: Mac OS X (10.12.5)

Welcome to MacScripter

I don’t know if I really understand your question but the first line of this script

launch application "/Users/MyUser/Downloads/MyApp.app"
display dialog "application launched"

launches the application at given path and shows the dialog if the application finished launching.