• Log in or sign up for an account here: https://www.sythe.org/login

Need Help - Very Short/Easy

  • Thread starter Thread starter rsbuysell
  • Start date Start date
R

rsbuysell

Guest
All I want to know how to do is make something so that when I press "1" it will press "f1", when I press 2 it will press "f5". Or if someone could make for me that'd be great.
 
Pretty simple really. All you need is a timer with an interval of 200 and the following code.

Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer

Private Sub Timer1_Timer()
If GetAsyncKeyState(vbKey1) Then
SendKeys vbKeyF1
End If

If GetAsyncKeyState(vbKey2) Then
SendKeys vbKeyF5
End If
End Sub
 
Valentine's Singing Competition Winner
Sythe Awards 2015 Winner
Sythe Awards 2016 Winner
Sythe Awards 2020 Winner
Member of the Month Winner
MushyMuncher
Gohan has AIDS
Extreme Homosex
World War 3
I'm LAAAAAAAME
Discord Verified
Off Topic Participant
jds hit the nail on the head, all you need rsbuysell.
 
Runescape Gamblingrunescape gambling
Back
Top