Option in command line decoder NOT to overwrite the clipboard

Apr 6, 2016 at 1:58 AM
Hi ZXing Experts,

I'm working on a program that calls the ZXing command line decoder (CommandLineDecoder.exe) to decode QR Codes. I'm using the --dump_results parameter to put the decoded value in a file, which my program then processes. It works very well! ZXing is a great tool! But a big problem is that it overwrites the clipboard while it decodes. Does anyone know how to stop it from writing to the clipboard? If not, is there a developer who could add an option for this, perhaps a --no_clipboard parameter? I realize that some users do want it on the clipboard, and since it's doing that now as the default, having an option to turn it off seems like the best approach. That way, existing usage of it (where it's expected to be on the clipboard) won't be affected.

Update: I searched the forum before posting this and found this thread from a few years ago:
https://zxingnet.codeplex.com/discussions/444093

So it seems that it did not overwrite the clipboard in the past and that there was an option called --copy_to_clipboard (that was a better idea, imo). Since it was obviously changed since then, I recommend that the opposite option be implemented, that is, --do_not_copy_to_clipboard (actually, it seems logical to me that if the --dump_results parameter is present, then the result should not be put on the clipboard).

I noticed in that thread this comment: "You can get the current source from the repository. You have to build your own version of the commandline tools." I'm afraid that's beyond me and am hoping that someone else is willing and able to do it. Thanks very much, Joe
Coordinator
May 9, 2016 at 8:52 PM
I added the option "--copy_to_clipboard" in revision 89781.
May 9, 2016 at 9:18 PM
To be clear, are you saying that revision 89781 will NOT copy to the clipboard unless the "--copy_to_clipboard" option is specified? Thanks, Joe
Coordinator
May 10, 2016 at 4:35 AM
Right.
May 11, 2016 at 2:02 AM
That's great! Thank you very much. Is there a Windows binary (CommandLineDecoder.exe) that I can download? Thanks again, Joe
Coordinator
May 16, 2016 at 7:57 PM
Not at the moment. You have to build it from the sources.
Jul 1, 2016 at 1:50 AM
Unfortunately, that's beyond me. If anyone following this thread builds a Windows binary (CommandLineDecoder.exe) for revision 89781, please let me know. Thanks very much. Regards, Joe
Coordinator
Jul 27, 2016 at 6:23 PM
Aug 2, 2016 at 3:32 PM
Thank you very much for this — I really appreciate it! Works perfectly! Regards, Joe