{ready} with stay_open and -T or -X

Started by Curtis, March 03, 2013, 07:16:50 PM

Previous topic - Next topic

Curtis

I'm in the process of writing a vb.net wrapper for exiftool.  All so far is working fairly well.  I key on the "{ready}" string to know when the last command is finished, which works most of the time for me except when using the -T  and -X options (and maybe others).

One work around I found was to send out another -execute, but if I do that when it is not needed (ie not using -T or -X) then when I send out my next set of arguments and a -execute and then read the stdout and look for {ready} I get the {ready} (from the second -execute) right away and miss getting the output for the last set of arguments.

Is there a way to consistently always get the {ready} response string without having to send an additional -execute for certain options like -T and -X?  Or is there a list that gives which options do and don't give the {ready} response when complete?  or ??

Thanks for any insights!
Curtis

Phil Harvey

Hi Curtis,

There is only one option that causes the "{ready}" message to be suppressed:  This is the -q option.  (-T is a shortcut for -t -S -q -f, so technically it doesn't count, but I will add it to the -stay_open documentation anyway to make this more clear.)  You should always see the "{ready}" with -X unless you add -q too.  Let me know if you find otherwise.

If you really must use the -q option, and still want to see a "{ready}" message, then you can emit it manually via -echo3 "{ready}" in your command.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Curtis

Phil... thanks for the quick response.

I understand now.  Right now I've been in the mode of getting the wrapper code functioning and did not dig into the option details too much with the -T option.  Knowing that the -q option, or any options that impy it, will suppress the {ready} is good to know.

You are correct that -X works fine... I was mistaken.

I did try the -t -S -f options in place of the -T option and I got the {ready} as expected but the output is different in that doing it this way it also lists the file name after ========= but with the -T option the file name is not given...

You have a great program... thanks so much for making it available... I'd hate to have to write the code myself to do what yours does!

Thanks again for the quick response!