about open() ... again...
in
Programming Questions
•
11 months ago
I wan to use processing to execute the following via Terminal in Mac OS:
gensky 6 21 15 -a 37 -o 122 -m 120 -c
in which "gensky" is a program and the rest are its arguments.
I found the following suggestion from the forum:
gensky 6 21 15 -a 37 -o 122 -m 120 -c
in which "gensky" is a program and the rest are its arguments.
I found the following suggestion from the forum:
String[] args = {"path/to/the.app",
"--args", "arg1", "arg2"..."argN"};
open(args);
so I have the following script:
String[] cmd_str = {"/Applications/bin/gensky", "--args", "6", "21", "15", "-a", "37", "-o", "122", "-m", "120", "-c"};
open(cmd_str);
However, it will give me the following error message when executed:
/Applications/bin/gensky ; exit;
/Applications/bin/gensky: Use error - arg count
I'm sure the arguments provided are correct because I can run "gensky 6 21 15 -a 37 -o 122 -m 120 -c" successfully if i type this line of strings in the terminal and hit enter...
May I why the args were not fed into the program correctly via processing?
Thanks!
so I have the following script:
String[] cmd_str = {"/Applications/bin/gensky", "--args", "6", "21", "15", "-a", "37", "-o", "122", "-m", "120", "-c"};
open(cmd_str);
However, it will give me the following error message when executed:
/Applications/bin/gensky ; exit;
/Applications/bin/gensky: Use error - arg count
I'm sure the arguments provided are correct because I can run "gensky 6 21 15 -a 37 -o 122 -m 120 -c" successfully if i type this line of strings in the terminal and hit enter...
May I why the args were not fed into the program correctly via processing?
Thanks!
1