vbs script help.

larciel

Diamond Member
May 23, 2001
4,590
8
81
I used to have this command script but erased it.

How do you emulate keyboard typing with vbs?

simple as a single alphabet as wel as tab and enter, plus combination keys like alt+f4

tia!
 

Noobsa44

Member
Jun 7, 2005
65
0
0
Dim objShell
Set objShell = CreateObject("WScript.Shell")
objShell.Run "C:\Windows\System32\Notepad.exe",,False

WScript.Sleep 1000

objShell.AppActivate "Untitled - Notepad"

objShell.SendKeys "Hello World!"
'Just do a search for sendkeys and you will find all the symbols for various special key combinations such as alt+f4.