I'm using Zbarimg which (I believe) outputs its data to STDOUT. So at present, a cmd string within a VBScript executes the command and stores it in a variable, thus:
xml_data=objShell.Exec("C:\MobiEvent\Zbar\bin\zbarimg -D -q --xml C:\MobiEvent\AllPics\*.jpg").stdout.readall
(For the uninitiated, -D stops it displaying an image of the barcode it reads from image, and -q keeps things quiet so only the XML data is output) That all works well with all the data of AllPics being stored in xml_data. Problem is, as ever, the console pops up a window that stays open whilst the script processes. And with 200+ photos, it stays open a while
The alternative is to use the Run command, and tag ",0,False" onto the end ... but then of course, the StdOut output is not picked up for post processing!
I'm wondering if it could be possible to combine the two using a pipe, my THEORETICAL syntax being ...
objShell.Run("C:\MobiEvent\Zbar\bin\zbarimg -D -q --xml C:\MobiEvent\AllPics\*.jpg"|to other script),0,True
** Not even sure if the program would do that as it may read the pipe as part of the directory path
Which then beggars the next question. If it =is= possible to pipe out the STDOUT, how do I read that piped output back into a second VBScript program? (All I need to do is get the output of the program to print out to a file so that I can post process by reading in again and splitting it into component parts to derive the photo filename and the QR value)
I know this "Run=hide window / Exec=cannot hide" debate has raged for a while. Just wondered if the above MIGHT prove an alternative option.