Hi, my english is poor because i'm spanish, sorry.
I need to make that a timer only use one repeat when i touch hotkey and stop.
For example, if I want that the timer1 write "CXZ" and stop. Actually Timer1 write: CXZCXZCXZCXZCXZ...
I try to put Timer2, that with other hotkey reload timer1, but finally timer1 and timer2 were broken.
My Code:
I want that timer1 only make one repeat and stop. Thanks :D
PD: Sorry for my english again ):
I need to make that a timer only use one repeat when i touch hotkey and stop.
For example, if I want that the timer1 write "CXZ" and stop. Actually Timer1 write: CXZCXZCXZCXZCXZ...
I try to put Timer2, that with other hotkey reload timer1, but finally timer1 and timer2 were broken.
My Code:
PHP Code:
Private Sub Timer1_Tick(sender As System.Object, e As System.EventArgs) Handles Timer1.Tick
Dim hotkey As Boolean
hotkey = GetAsyncKeyState(Keys.RControlKey)
If hotkey = True Then
My.Computer.Keyboard.SendKeys("CXZ")
My.Computer.Keyboard.SendKeys("{Enter}")
Timer1.Enabled = False
End If
End Sub
Private Sub Timer2_Tick(sender As System.Object, e As System.EventArgs) Handles Timer2.Tick
Dim hotkay As Boolean
hotkay = GetAsyncKeyState(Keys.Right)
If hotkay = True Then
Timer1.Enabled = False
Timer1.Enabled = True
End If
End Sub
PD: Sorry for my english again ):