S
S
Sergey2016-07-29 14:59:46
VBScript
Sergey, 2016-07-29 14:59:46

How to add a keypress to a script?

Dim WshShell
 
set WshShell = WScript.CreateObject("WScript.Shell") 

For doloop = 1 to 999999

WshShell.Run "taskkill /f /IM 123"
WScript.Sleep 3000
WshShell.Run "123.exe"

WScript.Sleep (30*60*1000)

Next

WScript.Quit

How to add a simulation of pressing the "Enter" key in ~ 5-10 seconds after opening the application?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
lvv85, 2016-07-29
@DDanser

Pressing the Enter key:

Set objShell = WScript.CreateObject("WScript.Shell")
objShell.SendKeys "{ENTER}", True

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question