Re: Simple newbie question
Re: Simple newbie question
- Subject: Re: Simple newbie question
- From: Michelle Steiner <email@hidden>
- Date: Mon, 12 May 2008 23:40:01 -0700
On May 12, 2008, at 10:22 PM, ba95 wrote:
tell application "Finder"
try
if "App1" is not in (get every process ) then open application
"App1"
open application "App2"
end try
try
if "App1" is in (get every process ) then quit application
"App1"
quit application "App2"
end try
end tell
Does not work either.
Launches and then immediately quits...
From looking at the code, it appears to assume that if app1 is
running, so is app2, and if app1 is not running, neither is app2.
With that in mind, this should work:
-- define app1 and app2
tell application "Finder"
try
if "App1" is not in (get every process) then
open application app1
open application App2
else
quit application app1
quit application App2
end if
end try
end tell
--
--------------------------------------------------------
Misquotation of unattributed, trite
metaphysical saying goes here.
Stupid ascii Unnecessary notice of
graphic goes here. responsibility goes here.
---------------------------------------------------------
_______________________________________________
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