We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › open pd from processing
Page Index Toggle Pages: 1
open pd from processing (Read 580 times)
open pd from processing
Mar 29th, 2006, 5:21am
 
is it possible to open bat files from processing? i was using the open function but it seems it just open exe files.
i need to open bat files because, im using puredata, and in the bat file i can put the flags like the name of the library im using , etc.

if not how can i use arguments with the open function? i cant find any example... for example i need to open pd in this way:
pd -lib zexy -nogui

how can i use those arguments (-lib zexy -nogui) with the open function?
Re: open pd from processing
Reply #1 - Mar 29th, 2006, 10:25am
 
Yes, I think you can open bat files, but it would actually involve using the same method as passing arguments.

To pass arguments, create a String array of all the things you would type on the command line:

Code:

// you would type:
// C:\>pd -lib zexy -nogui
// so make String array:
String[] commands = {"pd","-lib","zexy","-nogui"};
open(commands);


Hopefully that should work (depending on where pd lives, and if it's in your PATH), though it's just from my understanding of the open command, and I don't have pd to check.

To open a bat file, I think you could do:

Code:

String[] commands = {"cmd","/c","mybatfile.bat"};
open(commands);


But you can see that it would be a needless layer of indirection unless you wanted the command window around for pd to send messages to.
Page Index Toggle Pages: 1