Home > Software engineering >  VBS sendkeys command cannot send DirectX graphics interface of the game keys, troublesome everybody
VBS sendkeys command cannot send DirectX graphics interface of the game keys, troublesome everybody

Time:11-07

Dim wshshell
The Set wshshell=WSCRIPT. Createobject (" WSCRIPT. Shell ")
Wshshell. Appactivate "world of warcraft"
While true
Wscript. Sleep 3000
Wshshell. Sendkeys "1"
Wend

Above for VB content, such as word interface correctly every 3 seconds to enter a 1,
But unable to properly enter 1 in the world of warcraft game,
According to my preliminary understanding, because Windows 10 USES the DirectX graphics interface is unable to process Windows messages,

Excuse me each great god, how should manage?

CodePudding user response:

The VBS itself is no problem, I had a test, can work normally, but the script can't work on the window of the minimized state, may be the reason your feet didn't effect,
In addition, the script file coding is also need the ANSI,

CodePudding user response:

It with "system version" simply doesn't matter,
3 d games are almost use DirectInput for keyboard input state;
While Sendkeys just simulated keyboard messages,
So the message "simulation" of 3 d game is useless,
  • Related