求一段按键精灵代码 按下D代替同时按下W E R 且可以按住D不放 可以吗?
1个回答
展开全部
Declare Function GetAsyncKeyState Lib "user32" Alias "GetAsyncKeyState" (ByVal vKey As Long) As Integer
ajm = 68 '判断要按下或松开的按键的按键码
//判断按下d键
//KeyDown 68, 1
Key = GetAsyncKeyState(ajm)
i=0
rem lis
While Key<> -32767
Delay 100
Key = GetAsyncKeyState(ajm)
Wend
While Key= -32767
KeyDown "W", 1
KeyDown "E", 1
KeyDown "R", 1
KeyDown "D", 1
Delay 100
TracePrint I
I=I+1
Key = GetAsyncKeyState(ajm)
Wend
KeyUp "W", 1
KeyUp "E", 1
KeyUp "R", 1
TracePrint "TAIQI"
Goto lis
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询