• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: No way to tell if an application is running without launching it?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: No way to tell if an application is running without launching it?


  • Subject: Re: No way to tell if an application is running without launching it?
  • From: Nigel Smith <email@hidden>
  • Date: Tue, 05 Oct 2004 17:14:55 +0100

On 5/10/04 13:12, "Bill Planey" <email@hidden> wrote:

> I have a script that checks if an application is running, then quits it if
> it finds that it _is_ running.  The problem is - the mere fact that
> applescript checks for this application process is enough to launch it (and
> then, of course, the script quits it).  Just the act of checking seems to be
> enough to launch it if it isn't running at the time?

Are you sure that is what is happening?

Distiller will launch when you try to *compile* the script, and if you save
it as a script document rather than an application it will have to be
recompiled each time you open it -- that will launch Distiller.

(Some apps, especially Adobe's do this. It was explained once -- something
about dynamic scripting capabilities which can only be determined by
launching the app, I think...)

Anyway, this will do what you want if you save it as an *application*:

    tell application "System Events"
      if exists process "Distiller" then
        tell application "Acrobat Distiller 6.0.1" to quit
      end if
    end tell

HTH,

    Nigel

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: No way to tell if an application is running without launching it?
      • From: Christopher Nebel <email@hidden>
References: 
 >No way to tell if an application is running without launching it? (From: Bill Planey <email@hidden>)

  • Prev by Date: Re: Quark 6 Doc File Path = Temporary Items?
  • Next by Date: Re: reading an rsrc file?
  • Previous by thread: Re: No way to tell if an application is running without launching it?
  • Next by thread: Re: No way to tell if an application is running without launching it?
  • Index(es):
    • Date
    • Thread