Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer//这一句是一行While True If GetAsyncKeyState(65) <> 0 Then //65是A的ASCII码,不等于0表示按下 LeftDown 1 Else LeftUp 1 End If Delay 50Wend