• 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: Prevent application launching?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Prevent application launching?


  • Subject: Re: Prevent application launching?
  • From: Applescript User Lewis <email@hidden>
  • Date: Wed, 27 Mar 2002 04:06:18 -0700

At 14:29 -0800 26/03/02, Brad Knabel wrote:
I would like to send an AppleScript periodically from an application. I am
doing this from within carbon code. I would like to run this script in the
equivalent of a "quiet" mode where it simply fails if the application isn't
running. Is there a way to either:
1. Prevent an Applescript from launching an application if it's not running?
or
2. Determine the frontmost application from within an AppleScript?

tell application "Finder"
try
set p to (every process whose creator type is "CSOm") as list
on error
display dialog "Eudora Must be active for this script to run"
end try

That will tell you if Eudora is running.

--
___________________________________________________________________________
| applescript@ & "southgaylord.com"| Unix is very user friendly. It's just |
| I frankly do not believe Micro- | picky about who its friends are. |
| soft has the user's interests at | I want a party where all the women wear|
| heart, or even in mind. | new dresses and the men all drink beer.|
---------------------------------------------------------------------------
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Prevent application launching? (From: Brad Knabel <email@hidden>)

  • Prev by Date: [OT] Re: Zoom window / fit screen? How to with applescript?
  • Next by Date: Re: 2nd attempt: copying and pasting
  • Previous by thread: Prevent application launching?
  • Next by thread: Re: Prevent application launching?
  • Index(es):
    • Date
    • Thread