Solved

Is the App running?

Posted on 1998-05-21
1
165 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Named range not carried over 10 71
Hibernate methods 2 88
abstract class with all non abstract mentods 6 87
Change to event 1 138
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…
Suggested Courses

710 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