• 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
Simple newbie question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Simple newbie question


  • Subject: Simple newbie question
  • From: ba95 <email@hidden>
  • Date: Mon, 12 May 2008 19:50:13 +0200

Here comes a script
It launches 2 linked applications if they are not opened, and quits them if they are (toggle).


===
tell application "Finder"
	try
		get exists process "App1"
		if the result is false then open application "App1"
		open application "App2"
	end try
	try
		get exists process "App1"
		if the result is true then quit application "App1"
		quit application "App2"
	end try
end tell

===

This script works well, but it looks quite awkward to me. I would like to improve it.
I have tried other solutions unsuccefully...


Thx to help me.



_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
  • Follow-Ups:
    • Re: Simple newbie question
      • From: KOENIG Yvan <email@hidden>
  • Prev by Date: Re: Progress indicator for applescript process
  • Next by Date: Re: Simple newbie question
  • Previous by thread: Dumb Apple Mail scripting question.
  • Next by thread: Re: Simple newbie question
  • Index(es):
    • Date
    • Thread