How to press a key with a batch file

Hi, I am new to batch file, I want to know how to automatically press a key from a batch file. I want to create a program that opens a browser and automatically press the tab key.

+4
source share
1 answer

A search for "sendkeys batch files" and a further revision returned this list of answers for similar questions:

The batch file below does what you want:

@if (@CodeSection == @Batch) @then
@echo off
CScript //nologo //E:JScript "%~F0"
rem Open the browser here
goto :EOF
@end
WScript.CreateObject("WScript.Shell").SendKeys("{TAB}");
+5
source

All Articles