PDA

View Full Version : Do a shell script about the app project?




noahgolm
Sep 2, 2010, 12:47 AM
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:

#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.