|
How to Bind Send Key ?
How to Bind Send Key to enable send keys command for the game that is shielded by x-trap? I try it in notepad & it works but in game window does'nt.
this is the code...
Private Declare Function GetKeyPress Lib "user32" Alias "GetAsyncKeyState" (ByVal key As Long) As Integer
Private Declare Sub mouse_event Lib "user32" (ByVal dwFlags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cButtons As Long, ByVal dwExtraInfo As Long)
Private Const MOUSELEFTDOWN = &H2 ' left button down /This is actually MOUSEEVENTF_LEFTDOWN
Private Const MOUSELEFTUP = &H4 ' left button up /This is actually MOUSEEVENTF_LEFTUP
Private Sub Check1_Click()
If Check1 = 1 Then Timer1.Enabled = True
If Check1 = 0 Then Timer1.Enabled = False
End Sub
Private Sub Command1_Click()
Timer1.Enabled = False
Timer1.Interval = Text1.Text
End Sub
Private Sub Form_Load()
Check1.Value = 0
End Sub
Private Sub Timer1_Timer()
If GetKeyPress(vbKeyF6) Then
Timer1.Enabled = True
SendKeys ("{2}")
ElseIf GetKeyPress(vbKeyF7) Then
Timer1.Enabled = False
End If
If GetKeyPress(vbKeyF8) Then
MsgBox ("Main hotkeys are F2 Start Auto Clicker f3 stop")
End If
If Timer1.Enabled = True Then
SendKeys ("{2}")
End If
End Sub
Private Sub Timer2_Timer()
If GetKeyPress(vbKeyF6) Then
Timer1.Enabled = True
End If
If GetKeyPress(vbKeyF7) Then
Timer1.Enabled = False
End If
If GetKeyPress(vbKeyF8) Then
MsgBox ("Main hotkeys are F6 Start Auto Clicker F7 stop")
End If
End Sub
|