Jump to content

Pause, Send Keys, Activate App from Batch/CMD File


Recommended Posts

Hi Everyone

I actually wanted to send this tool to Aaron, so that he can include it in his Unattended website if he wants to, but there are no attachenets allowed in PMs.

I created this small (8.5 kb) command prompt tool for installation automations. (Written in .Net) I know many people don't trust first time posters, since they could be submitting viruses and so on. Thats why I include the sourcecode as well.

The tool can:

  • Activate any application

  • Send keys to any application

  • Create a pause in your batch command,

or any combination of those 3.

Anyone who wants to use it is free to do so.

Here are some examples:

To create a 1 second pause in your batch command.

DoKeys /WS 1000 ""

Just send Hello World!

DoKeys "Hello World!"

Send Hello World after 500 milliseconds

DoKeys /WS 500 "Hello World!"

Just activate an Untitled Notepad document

DoKeys /WA 0 Untiteled ""

Wait a second before activating an Untitled Notepad document, then send Hello World!.

DoKeys /WA 1000 Untiteled "Hello World!"

Wait 2 seconds before activating an Untitled Notepad document, then wait another second and then send Hello World!.

DoKeys /WA 1000 Untiteled /WS 1000 "Hello World!"

Here is some more info on the text you can send.

In order to send any of these characters: + ^ % ~ ( { [ ) } ] they have to be enclosed in curly braces. Example {+} just sends +

If you want to send any keys on your keyboard that are not characters such as Enter, Page Home, Tab ... use the following.

Backspace = {BS}

Delete = {Del}

End = {End}

Home = {Home}

Insert = {Insert}

Page Up = {PgUp}

Page Down = {PgDn}

Enter = {Enter}

Tab = {Tab}

F1 up to F12 = {F1} {F2} {F3} and so on

Add on Numpad = {Add}

Subtract on Numpad ={Subtract}

Multiply = {Multiply}

Divide = {Divide}

Arrow Keys

Up = {Up}

Down = {Down}

Left = {Left}

Right = {Right}

If you want to send key combinations that include Shift, Ctrl or Alt, use the following signs Just before the letter you press.

Shift = +

Ctrl = ^

Alt = %

DoKeys.zip

Link to comment
Share on other sites


  • 4 years later...
  • 1 year later...
  • 4 weeks later...

How to activate this aplication???

In the name have a space, but not activate... :-(

I have a error?

DoKeys /WA 1000 Deejaysystem Video VJ2

DoKeys /WA 1000 "Deejaysystem Video VJ2"

DoKeys /WA 1000 DeejaysystemVideoVJ2

This is OK:

DoKeys /WA 1000 Untiteled "Hello World!"

THANK's!

Link to comment
Share on other sites

  • 5 months later...

Was searching for a tool similar to this, Thanks for the post my friend. :-)

Had to register to get your tool though. But guess your efforts are worth it.

Well Done !!! Thanks again. :-)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...