We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello everyone,
I'm trying to use https://github.com/fogleman/primitive go sketch for image. I've set it up on my mac environment I'd like to add some feature via processing.
Would it be possible to have the following sequence :
1 - Capture camera pic via processing (I know it is and how :)
2 - run the go program via command line in my sketch, in order to process the captured pic #1. Result is stored in folder on my harddrive.
3 - display the result as output of #2 and add a funny message.
The only isssue is #2 as the other steps are classical processing made.
Regards
Answers
Use exec().
http://processing.github.io/processing-javadocs/core/
https://processing.org/reference/launch_.html
Hello TfGuy44
and sorry for the late answer
... I think reading the output and error streams would be helpful my process calls returns nothing. If I set up the waiter like you suggested, it ends up with return 1 as int return value, but still nothing happens really
just a catch catch (IOException e) { System.err.println(e); } returned two numbers. Respectivly 56 and 95
Working my way through with https://forum.processing.org/one/topic/execute-terminal-commands-again.html
pointlessly continued here:
https://forum.processing.org/two/discussion/23085/use-command-line-instructions-in-sketch
alright, it's here:
https://forum.processing.org/two/discussion/23085/use-command-line-instructions-in-sketch
THIS IS WHY we try to keep all the information in one place and not start pointless duplicate threads.
in the babash script try adding a
2>/tmp/errors
to capture stderr, see if it prints anything. you could also callenv
to get it to print the environment if you think something is missing