I have a short script to launch an application, wait 15 seconds, then quit it:
tell application "ZephIR"
activate
delay 15
quit
end tell
I need to run this script as a Log In item, so I saved it as an application. The script, when run from AppleScript Editor, works great, but the application doesn’t work. When opened, the application launches, the icon shows up in the dock, but the B/W beach ball shows up and ZephIR never opens. After 15 seconds the application quits.
Any idea what is going on and/or how to fix the problem?
Hey thanks, that worked great! The application did just what I wanted it to do! Apparently I know enough about AppleScript to get things half done, but I never know enough to finish a project without asking a question.
(However, I will say that after I posted the question I found a better solution to the problem I needed solving. The reason that I have to start ZephIR and then quit it is that when started it starts a background process. Upon quitting the program the background process stays active, which is what I need. So I dug around in the “Show Package Contents” of the application and I found the background process. I added that to my login items, and we are a go with no applescript!)