Solved

Is the App running?

Posted on 1998-05-21
1
160 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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
not able to insert into temp table 68 150
deburging in oracle form 12 76
Doc'in system (example?) BA 7 78
zeroMAx challenge 20 76
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

758 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

22 Experts available now in Live!

Get 1:1 Help Now