Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Aug 2002
    Location
    U,S. Ga.
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Help with creating a batch file

    Hey All,

    I'm a simpleton here - I need help with creating a batch file (or something that will perform this function) :

    I want to build a "software copier" using my scanner. I'm trying to set up something so I can put a document in the scanner - have it scan (100 ppi) - "fit to page - and print as a single function.

    Not planning to buy a copier anytime soon - I have no problem scanning a doc at a 75-100 ppi resolution and then printing it -

    but why not have an icon to click and avoid the process of launching my scanner software - setting resolution - select scan - select print - select "fit to page" - select OK . . .

    Any help appreciated

  • #2
    Senior Coder
    Join Date
    Feb 2004
    Posts
    1,206
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hmm.. That might not be as easy as it sounds..

    First off, what OS are you running? If it's windows it's probably harder to do.. it'd also be called a Script file - not a batch file. If it's Linux, it's probably doable as most programs come with a command line interface..

    But for some reason I'm gonna assume Windows:

    In order to communicate with your Scanner, you need to actually communicate with its driver. Loading up the software which is specifically designed to communicate with the driver is the easiest way.

    Is there a button, or key-combination (like ctrl+2 or something weird like that), in your scanning software to scan an image? How about quick-keys for fit to page... ? and then print?

    I'm wondering if you could create a script file that would launch your scanning software, and then you can have the script file press the key combinations in order and scan, fit, and print the document.

    If you can't manage that, I don't think it's gonna be too easy to do.. unless your scanning software is user-programmable (ie. includes some sort of a script language... sort of like MS Office apps and VBA), then it could very well be possible.

    Hope that's some help to you.
    Sadiq.

  • #3
    Regular Coder
    Join Date
    Dec 2003
    Posts
    367
    Thanks
    0
    Thanked 0 Times in 0 Posts
    But for some reason I'm gonna assume Windows
    What reason could there be to do that?

    But I'll make the same assumption.
    I don't know about sending keystrokes from a script, but you sure can do that in C++ or VB. If you know how to program you can try starting up your scanner software (maybe minimized) and send it's window the appropiate messages.
    For a script I think you'll need a command line interface, and you won't know if you have one until you check your manual.

    shmoove

  • #4
    New to the CF scene
    Join Date
    Aug 2002
    Location
    U,S. Ga.
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile

    Thanks for the inputs. . . Yes I run Win 98.

    Reason = Just bought a new HP Printer/Scanner/Copier/Fax - - I was hoping to upgrade my capibility by adding the Copier & Fax - it was a disaster all the way - perhaps a system incompatibility or unit hardware issue. In any case HP could not talk me through it. - - - Back to Walmart it went !

    Then I got to thinking - I have a scanner that's great - I have a printer so why not try to combine the motions of scanning and printing into one easy mouse click. This is mostly for my wife's benifit, but I like the idea too.

    Sorry - I'm VB illiterate - I should try use & learn the app more - but it's a time thing for me. I have an 1800s version of VB but never explored it much.

    Maybe I should get a VB for Dummies book . .
    Last edited by bnuts40; 05-02-2004 at 03:37 PM.

  • #5
    Regular Coder
    Join Date
    Dec 2003
    Posts
    367
    Thanks
    0
    Thanked 0 Times in 0 Posts
    A VB for Dummies book won't help you too much here. What you'll need are mostly Win32 API calls (like SendMessage() to send a "keystroke" to the app), and that isn't covered in any beginner's or intermediate VB texts. So you probably need some Windows 32 Programming for Dummies book then (but the internet, specially MSDN, would be much more useful).

    But before you start on that you should really look at the documentation you got with your printer and your scanner. Chances are there is a command line interface (or some sort of API) and that would make the whole process much easier.

    shmoove


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •