Results 1 to 1 of 1

Thread: SENDKEYS no more supported by DOS ?

  1. #1
    Arun Kumar's Avatar
    Arun Kumar is offline MVP Alumni
    Join Date
    Aug 2012

    Question SENDKEYS no more supported by DOS ?

    Hi All,

    It may seem I am still stuck with the 90s but then, I am trying to create some utilities without having to install VC, creating a program and then installing the finished product as it will take up additional resources. Since CMD is already loaded into the memory, maybe I can use its functions without overheads.

    The utility in question here is one that can take screenshots at regular intervals and post them as any graphic file in some folder. I remember using SENDKEYS when learning MS DOS programming. We would load DOSKEY first and then use SENDKEYS to send certain keystrokes to perform one or more functions.

    Though there are some third party programs in the market but I won't use them for the following purposes:
    1. Most of the best ones are paid (and costs a good amount for subscription)
    2. The only free one I could find would take snaps of screen at 360X240. How am I supposed to view the timestamp for monitors using 1280pix using that resolution? It breaks up upon enlargement.
    3. The services are mostly cloud based so whatever is happening on my computer would be based on some remote server. If the programs were backed by some major companies, I can trust them. But these (Was it TIghtIT?) programs are never heard of. Basically, I would keep the screenshots on some hidden folder on the same computer or on a networked device.
    4. HappyAndyK gave me a solution that involved using AHK files and Dropbox. It worked fine but since I am already running Google Drive, SkyDrive Desktop and Comodo Backup, this method was kind of hanging my computer for a while every now and then. Wouldn't say that the method is not good. Rather, my laptop has only 2GB and 1.6GHz processor so that explains slowing down and hanging. It also kind of stops responding when VLC player changes from one track to another - for a moment. So removed Dropbox as there was no other use for it on my computer.

    That leaves me with the choice of creating a utility on my own. Here is a basic logic:
    1. Reset the timer to current system time
    2. Set Interval to 5 min (or any duration you would want between the screenshots)
    3. Fetch current time from system clock
    4. If (current time = Timer)
    Fetch Date
    SENDKEYS {PRNTSCR} //copy screen to clipboard
    SENDKEYS "WIN+R" //open run dialog
    SENDKEYS "MSPAINT" //type mspaint in run dialog
    SENDKEYS {ENTER} //hit enter to open ms paint
    SENDKEYS "^+V" (CTRL+V) //copy clipboard to paint
    SENDKEYS "^+S" (CTRL+S) //issue save command
    SENDKEYS "DATE+TIMER"+".bmp" //name = date+time
    SENDKEYS {ENTER} //save the file
    SENDKEYS "%"+{SPACE} //ALT+SPACE brings up window control menu
    SENDKEYS "C" //closes MS PAINT

    The above is just a basic code. I wonder if it can be implemented in MS DOS using CLI commands of DOS. I tried to check SENDKEYS through batch files but it did not do anything. I did not even get any error message.

    So: is the above possible without having to resort to standard programming languages (C, VC, VB). I am sure there was a method way back but Microsoft has been dropping features as it moves on. For example, in Word 2013, you cannot right click on a mis-spelled word and add it to autocorrect.

    Last edited by Arun Kumar; 17th September 2012 at 15:14. Reason: incorrect value in logic

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22