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

yarjarrar

macrumors member
Original poster
Jul 2, 2008
83
0
California
This is a ticklish question, but is there any way to open an application and close it, open it. so on, many times. So the application gets started like 100 times in a minute. Is that possible or am I nuts to think there's a way to do that?
 
This is a ticklish question, but is there any way to open an application and close it, open it. so on, many times. So the application gets started like 100 times in a minute. Is that possible or am I nuts to think there's a way to do that?

Yeah, thats what terminal was made for!

here is a quick script I just wrote that will open and then kill Safari 100 times

Code:
#!/bin/bash

for I in {1..100}
do

/Applications/Safari.app/Contents/MacOS/Safari

sleep 10

killall Safari

done
 
Code:
#!/bin/bash

for I in {1..100}
do
        open /Applications/Safari.app
        sleep 3
        killall Safari
done
 
Yeah, thats what terminal was made for!

here is a quick script I just wrote that will open and then kill Safari 100 times

Code:
#!/bin/bash

for I in {1..100}
do

/Applications/Safari.app/Contents/MacOS/Safari

sleep 10

killall Safari

done

You need an & at the end of your Safari invocation.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.