Menu

#39 Open iCopy, pressing "scan" button ON THE SCANNER to make scans, changing iCopy settings in process

Next_Release
open
nobody
None
1
2014-11-13
2014-10-28
Elias
No

Is it possible to make scans with iCopy by pressing hardware button "Scan" on the scanner device? If not yet, it is my feature request.

I see it in this way:
First we press the scan button to start iCopy application, then tune iCopy settings as we need, and then we pressing the same hardware button to make lots of scans one by one. iCopy window stays opened to quick fix some settings time by time (paper size, crop borders, brightness etc...). Scans we make are saving with unique names (serialized by datetime or increasing +1 numbers or whatever...).

If you have the question, why use the hardware button while we have big blue iCopy diamond on the computer display... I would say to it, because the hardware button is on the scanner, designed nearby scanning documents. When we scanning LOTS of papers, it is a lot easier to pressing it right here right now. Both our hands staying in one square feet zone above the scanner all the time. No turning to computer and back to scanner, no aiming with mouse, no walking couple (or more) steps to next table.
In another side, there is more comfort like no big rush with time interval autoscan mode when you feel like a slave сhained to a paddle on a roman galley. :-)

Discussion

  • Matteo Rossi

    Matteo Rossi - 2014-10-28

    Dear user,

    iCopy can already be started from the scanner button, if you installed it using the setup and you selected "Register to scanner buttons" during the guided procedure. You can also register iCopy to the scanner buttons by executing the command
    icopy.exe /register from a command prompt in iCopy installation folder.

    By default, iCopy is started in the graphical mode. However, you can tweak the action of the scanner button by editing the Windows Registry, as described in this post on iCopy website: http://icopy.sourceforge.net/register-your-application-to-scanner-events/
    .
    A possible way to achieve your goal could be the following.

    Set the command line for icopy in the windows registry to something like

    icopy.exe /file
    

    or

    icopy.exe /pdf
    

    (you need a reboot for this to take effect).

    Start iCopy normally, change its settings, go to settings and set iCopy to save the files to a specified folder. Icopy will then save the files with a datestamp. Now make a test scan, in order for iCopy to save the settings, and then close its interface. Now, when you press the scanenr button, icopy will be launched in command line mode and will use the latest settings.

    If you want to change some settings, you can change them through the command line arguments, see the readme.html file, or you need to start the icopy GUI again and make the required changes. However, the way windows handles the hardware scanner buttons makes it difficult to change the command line for the button from time to time as it requires editing the windows registry and possibly restarting windows each time.

    Please let me know if you need further instructions, and if the above works for you.

    Matteo Rossi

     
    • Elias

      Elias - 2014-10-29

      Thank you Matteo, I very appreciate your explanation. A lot of questions is gone! But still I modestly suggest to consider my vision.

      However, the way windows handles the hardware scanner buttons makes it difficult to change the command line for the button from time to time as it requires editing the windows registry and possibly restarting windows each time.

      Well, I think there might be an easy way not to change the command line. Let's assume, we have such command for the hardware button:

      icopy.exe /file /hybrid
      

      By this command:

      1. Either if this is the first instance of iCopy in memory, then it will be started in GUI mode, as usual, ignoring CLI arguments.
      2. Either if this is will be the second one, then it will be started in hidden CLI mode, asks for scan settings from the first (GUI) instance (or from registry, or from settings file, etc...), makes a scan and exit. First instance stays running though for user facility.
      3. Or second (CLI) instance just starts and terminates, but inbetween it sends some kind of message to first (GUI) to perform a scan.
       

      Last edit: Elias 2014-10-29
  • Matteo Rossi

    Matteo Rossi - 2014-10-29

    Dear Elias,

    your suggestions are very interesting. However, they require some changes in the code and I'm afraid I won't be able to implement them anytime soon. For example, WIA API requires exclusive access to the device, which means that if iCopy is running no other instances can be run at the same time, unless I change the way iCopy interface works.

    As a workaround you can use the proposed solution, and limit the settings adjustments between the scans. Or you can create a shell script that facilitates the operation, for example by editing the icopy.settings file directly.

     
  • Elias

    Elias - 2014-11-13

    WIA API requires exclusive access to the device

    I didn't know that, thank you for this information. In such case it seems it needs to split the program apart. First part should be just a GUI for the second one, which will be a CLI and a scaner handler. Now I understand, it seems not so easy as it was.

    I won't be able to implement them anytime soon

    Anyway, I find your program brilliant as it is right now. Thank you!

     

Log in to post a comment.