Home > Software engineering >  VBS automatic button
VBS automatic button

Time:06-05

What a great god help me to write this small program
Press space to
Hold down the CTRL key continuous press 30 x
Press the space end

CodePudding user response:

The HTML code is as follows, too soon can be appropriate to add "wscript. Sleep 200" :
 
Set the shell=createobject (" wscript. Shell ")
Shell. The sendkeys "", true
For I=1 to 30
Shell. The sendkeys ^ "x", true
Next
Shell. The sendkeys "", true

CodePudding user response:

reference 1st floor milaoshu1020 response:
code is as follows, too soon can be appropriate to add "wscript. Sleep 200" :
 
Set the shell=createobject (" wscript. Shell ")
Shell. The sendkeys "", true
For I=1 to 30
Shell. The sendkeys ^ "x", true
Next
Shell. The sendkeys "", true

Can the game background?

CodePudding user response:

Can, but if is a continuous pressing CTRL, this script may not be able to do,
It can only make sure to press the x is by pressing the CTRL;
  • Related