Hola machin!
Aca te pongo el código, soy un prinsipiante en visual basic asi que espero que alguien me pueda ayudar
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 MOUSEEVENTF_LEFTDOWN = &H2
Private Const MOUSEEVENTF_LEFTUP = &H4
Private Const MOUSEEVENTF_RIGHTDOWN = &H8
Private Const MOUSEEVENTF_RIGHTUP = &H10
Private Sub Timer1_Timer()
pulsar = MOUSEEVENTF_LEFTDOWN
soltar = MOUSEEVENTF_LEFTUP
mouse_event pulsar Or soltar, 0&, 0&, cButt, dwEI
End Sub
Private Sub Command1_Click()
Timer1.Enabled = True
End Sub
Private Sub Command2_Click()
Timer2.Enabled = True
End Sub
Private Sub Timer2_Timer()
pulsar = MOUSEEVENTF_RIGHTDOWN
soltar = MOUSEEVENTF_RIGHTUP
mouse_event pulsar Or soltar, 0&, 0&, cButt, dwEI
End Sub
Aca te pongo el código, soy un prinsipiante en visual basic asi que espero que alguien me pueda ayudar
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 MOUSEEVENTF_LEFTDOWN = &H2
Private Const MOUSEEVENTF_LEFTUP = &H4
Private Const MOUSEEVENTF_RIGHTDOWN = &H8
Private Const MOUSEEVENTF_RIGHTUP = &H10
Private Sub Timer1_Timer()
pulsar = MOUSEEVENTF_LEFTDOWN
soltar = MOUSEEVENTF_LEFTUP
mouse_event pulsar Or soltar, 0&, 0&, cButt, dwEI
End Sub
Private Sub Command1_Click()
Timer1.Enabled = True
End Sub
Private Sub Command2_Click()
Timer2.Enabled = True
End Sub
Private Sub Timer2_Timer()
pulsar = MOUSEEVENTF_RIGHTDOWN
soltar = MOUSEEVENTF_RIGHTUP
mouse_event pulsar Or soltar, 0&, 0&, cButt, dwEI
End Sub