Solved

Is the App running?

Posted on 1998-05-21
1
161 Views
Last Modified: 2013-12-26
Is there a way to get AppleScript to recognize if an applicatin is *not* running? I need to have an app run all the time and if it quits unexpectedly, or someone unknowingly quits it, I need AppleScript to automatically start it again.
0
Comment
Question by:jonsey
1 Comment
 
LVL 2

Accepted Solution

by:
gormenghast earned 50 total points
ID: 1291411
Hi

You need to create a script to run as an agent, you create an agent by setting the stay open option when saving your applescript application. You need to include a "run" and an "idle" handler and set its idletime to however frequently you want to check for the application. To check for the application use the following (substituting "Stickies" for whichever application you are checking for):

tell application "Finder"
      if (application "Stickies") is not in processes of it then
            tell application "Stickies"
                  activate
            end tell
      end if
end tell
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Folder Comparison 12 53
Replacement selected text 2 58
Looking for a specific application/software 2 104
sumHeights  challenge 17 66
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now