Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

seydurin

macrumors member
Original poster
Aug 3, 2010
40
0
I already have the script for launching one or more applications, and I could make a new one to quit them, but I was hoping it could be made into the same script. Can this be done?

here's what I have now:

tell application "Firefox" to activate

tell application "BetterTouchTool" to activate
 

misee

macrumors member
Jul 4, 2010
65
0
Code:
set appName to "Terminal"
tell application "System Events" to set counter to the count of (processes whose name is appName)
if counter = 0 then
	tell application appName to activate
else
	tell application appName to quit
end if
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.