Search code examples
batch-fileexecutablekeystroke

Emulate keystroke in other window


This may be a cardinal programming sin, but what's the easiest and quickest way via executable or batch file to bring focus to Window X and hit keystroke Y? This won't be reused, and X and Y can be hard-coded if necessary.

edit: on a Windows machine


Solution

  • You can try AutoHotkey or use win32 API as MusiGenesis suggested.