Sorry for the poor title but it's hard to explain in a few words what I'm looking for hence Google can't show me what i'm looking for.

I'm under the impression that many Windows applications can be run with arguments via command line. My question if there is a log or a program that would show you the commands that have just been ran after you have interacted with a program via the Window's GUI.

So for instance if I:

opened Media Center -> Live TV

The log or program would give me the resulting console commands in order to run the GUI actions via CMD

If I could see what actions were being taken behind the scenes of the GUI I could really automate many menial tasks.

  • 1
    The relation between command line and GUI isn't a standard. Most application functions are actually only available via its GUI. Some can be controlled via COM or other API methods, but for the most part you'll be better of automating it according to @iglvzx answer. Jun 13 '12 at 1:12
  • Many of the server mgmt tools are now written to generate and execute Powershell commands to so the work (Exchange was first to do this). But what you are asking is not typical for client tools.
    – uSlackr
    Jun 13 '12 at 1:47

For automating GUI tasks, you can use AutoHotkey. For example, the following script will run Notepad, wait until it is active (has focus), and then select Help > About Notepad:

Run, notepad.exe
WinWaitActive, ahk_class Notepad
SendInput, !h
SendInput, a


  1. Run, notepad.exe : launches Notepad

  2. WinWaitActive, ahk_class Notepad : waits until Notepad is active

  3. SendInput, !h : opens the Help menu by pressing Alt+h

  4. SendInput, a : selects About Notepad by pressing a

  5. ExitApp : the script is done, so it exits.

Now, this is a a boring example, but it gives you an idea of what can be done with AutoHotkey.

You can run scripts by double-clicking on the .ahk file, or even from the command line! You can also compile scripts into .exe files for portability.


(AutoHotkey is one of my favorite utilities. You can find more script examples on Super User by browsing the tag or my profile.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.