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
Private Const MOUSELEFTUP = &H4
then go to your form and then double clik the timer and add this code
Code:
mouse_event MOUSELEFTDOWN, 0, 0, 0, 0
mouse_event MOUSELEFTUP, 0, 0, 0, 0
and then to your form and double clik on the command buttons and for
cmdstart:
Code:
timer1.enabled = true
cmdstop:
Code:
Code:
timer1.enabled = false
MOST IMPORTANTLY CHANGE THE TIMER INTERVAL TO 1000 FOR 1 SECOND,2000 for 2 seconds etc... MUST
Quote:
Extras
add a slider put the min as 10 and max as 5000 (go projects and components then check windows visual back controls 6.0)then name the slider sldamnt and add this code to the cmdstart button 2nd line
Code:
Code:
Timer1.Interval = sldamnt.Value
-------------
Private Sub Command1_Click()
Timer1.Enabled = True
End Sub
Private Sub Command2_Click()
Timer1.Enabled = False
End Sub
Private Sub Command3_Click()
End
End Sub
Private Sub Timer1_Timer()
SendKeys.Send (textbox1.Text)
SendKeys.Send ("{enter}")
End Sub
0 comments:
Posting Komentar