Call PureData at startup

I´m working in winxp
I wan to start PureData and a patch just as I start my OF app.

What i neeed is to launch a .exe file. (c://pd/bin/pd.exe).

I googled and found the “system()” function, but it is not working for me cause it just starts PD and the patch but fails to load my OF app. As i close PD then the OF appears. :? :?

I want them both tobe running… it should be easy, but have not managed.

To complete my question, I also want to qiut PureData as i quit my OF app.

Anybody there knows how to manage this???


sounds like you need to have OF ‘fork’ the process that it uses to launch PD. if you just use system() as is, it waits for a return value (like when PD quits). I don’t know how to do this in c++ but it’s definitely possible. try googling ‘c++ system fork’ or something

as for then closing it on quitting, add a void testApp::exit(); function to your app and have it use system() to quit PD (no need for forking there)

if you sort out the forking - please post a snippet :wink:


try ending your system command string with a &
this makes the process run in a background thread so that the terminal returns immediately.

system ('say hello world ');

system (‘say hello world &’);