We are about to switch to a new forum software. Until then we have removed the registration on this forum.
How to execute os shell commands (windows shell commands like "netsh") in processing?. For example python has os module which helps in executing shell commands, likewise is there any module or library for processing?
Answers
@Tarun==
Process process = Runtime.getRuntime().exec(your Arraycommand)
I thought that Processing already had an undocumented function called exec()! :-/
@GoToLoop== till now i have always used as i posted before and it runs (better to use a thread); but would you give some example with simply this exec() method? what parameters??? - normally it should an array of strings, no???
I've never used exec() before. It's undocumented after all!
And just seen it mentioned once in this forum in the form of open():
https://processing.org/reference/open_.html
But even using the formal Runtime's exec(), there is an overloaded format w/ String[] parameter too:
http://docs.oracle.com/javase/8/docs/api/java/lang/Runtime.html#exec-java.lang.String:A-
@GoToLoop==
thanks! - of course the open(String[]) from P5 is a good shortcut that i didn't knew; till now i always thought that open() could only be used with filename parameter...