This is probably a simple one, but I'm pretty new to Xcode and a little bit stumped.
I'm writing up a simple app to run "yes > /dev/null" in terminal just to save some time when stressing my CPU, but when I run the script (assigned to a button) the application freezes and no other buttons can be pushed (for example, the Activity Monitor and Grapher launchers become unresponsive). Ideally, I'd like to be able to push the Terminal button to start the script, and push it again to kill the script. But since the app freezes until the process finishes (which, it never will) I can't seemingly do this.
This is the Applescript assigned to the Terminal Icon:
CODE
on clicked theObject
do shell script "yes > /dev/null & yes > /dev/null & tick" with administrator privileges
end clicked
do shell script "yes > /dev/null & yes > /dev/null & tick" with administrator privileges
end clicked
And this is the application itself: