[Help] threading
im working on a bot but i cant get my w press to release properly i have it pushig and holding now, u just need to be able to shut it off at a specified time.. any pointers? thanks in advance
heres my timer
Public Sub wPress_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles wPress.Tick
' wRelease.Enabled = True
Dim time As New Stopwatch
time.Start()
Do While time.ElapsedMilliseconds < 0.1
keybd_event(VK_W, 0, 0, 0)
Loop
End Sub
ive also tried
Public Sub wPress_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles wPress.Tick
' wRelease.Enabled = True
Dim time As New Stopwatch
time.Start()
Do
keybd_event(VK_W, 0, 0, 0)
Loop Until time.ElapsedMilliseconds = 5000
End Sub
i should also say i dont want to stop it with a bbutton, i want to stop this timer with another that runs for 5 seconds then calls wPress.stop()
actually i just thought of another way to inpliment w scroll lock if i cant get this figured out,, ill have too spam the a, s, and d keys tho
heres my timer
Public Sub wPress_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles wPress.Tick
' wRelease.Enabled = True
Dim time As New Stopwatch
time.Start()
Do While time.ElapsedMilliseconds < 0.1
keybd_event(VK_W, 0, 0, 0)
Loop
End Sub
ive also tried
Public Sub wPress_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles wPress.Tick
' wRelease.Enabled = True
Dim time As New Stopwatch
time.Start()
Do
keybd_event(VK_W, 0, 0, 0)
Loop Until time.ElapsedMilliseconds = 5000
End Sub
i should also say i dont want to stop it with a bbutton, i want to stop this timer with another that runs for 5 seconds then calls wPress.stop()
actually i just thought of another way to inpliment w scroll lock if i cant get this figured out,, ill have too spam the a, s, and d keys tho


