I’ve got a command line tool, I’d like to wrap in a Xojo GUI. But it’s weird… It takes binary data from stdin, processes it and puts it in stdout.
My Xojo app creates the binary data in the format it expects and I can test this, but writing the data to disk and using “cat <pathToFile/> | <pathToTool/>
” and it writes the processed data to stdout.
However I really want to avoid writing the data to disk first and then using cat to load it up. But I seem unable to get it to work.
shell.execute "<pathToTool/> <binaryData>"
makes the tool crash. Writing the data to the shell first and then calling the tool fails, so does launching the tool and then writing the data.
shell.write <binaryData>
shell.execute <pathToTool/>
Setting the mode of the shell to 2, just sits there and doesn’t complete (I’d also like to avoid this as it needs to be called in a function).
I’ve also tried enabling caninomical and sending chr( 4 ) after sending my binary data, and it still just sits there.
There has to be something I’m missing, I’ve never tried sending binary data to a command line tool. Ideas?