[Last Call] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1475
  • Last Modified:

Simulate keyboard command in batch file

I was wondering if it is possible to have a batch file simulate a keyboard command...namely the 'alt tab' feature for windows xp?

Any help would be greatly appreciated.
  • 2
1 Solution
A batch file cannot simulate a key stroke without the aid of external applications that it would have to call.

If you want an easy way to this feature, consider using a Windows script instead of a batch file, or please have a look at AutoIt, a command line scripting language and keystroke simulator on steroids: http://www.autoitscript.com/autoit3/
I've looked into key-fake, it doesn't apply.
1.) it only does this:
"Purpose:  Supplies the series of keystrokes needed to
                    initialize an application program on boot-up."
(quoted from the doc)
2.) it's a 16bit DOS tool written in 1985, which means it cannot simply run inside a Windows batch environment. It will blank the complete desktop when called.

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now