Hello and I'm .DLL,
At the moment Im a newbie at VB.NET and I had a thought one day while playing Combat Arms,
"Me : Why not make a quick switcher in VB.NET..."
Whats a quick switcher you might ask?
It's basically , hmm can't explain that well.
Well you know when your sniping and you click the letter 'Q' two times to re-duce the recoil or accuracy and such
basically a quick switcher would allow you to set some options so when you shoot/click (LMB) about 0.02 seconds after you
shoot it would activate the quick switcher allowing it to click 'Q' two times with-out you moving a figure.
Well why cant you make such a simple program?
As I stated above Im still a VB.NET newbie and I really don't want to work on the basic kind-of programs I want to move on
to the 'Intermediate' level programs and leave the 'Beginner' level.
Here is my code so far (I've been working on this for about 10minutes);
Code:
'Bisma - QuickSwitcher
Public Class Form1
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Long) As Integer
'------------------------------------------------------
'Other(s)
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Button2.Enabled = False
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
If GetAsyncKeyState(Keys.Q) Then
SendKeys.Send("{Q}")
SendKeys.Send("{Q}")
Status.Text = "Quicking!"
Else
Status.Text = "Waiting for input..."
End If
End Sub
'------------------------------------------------------
'Buttons
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Timer1.Start()
Button1.Enabled = False
Button2.Enabled = True
Status.Text = "[B]Quicking!"
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Timer1.Stop()
Button2.Enabled = False
Button1.Enabled = True
Status.Text = "[B]Waiting for input..."
End Sub
'------------------------------------------------------
'Tool Strips
Private Sub SupportsToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SupportsToolStripMenuItem.Click
MessageBox.Show("Combat Arms Only (MULTI SOON)")
End Sub
Private Sub ExitToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitToolStripMenuItem.Click
Application.Exit()
End Sub
'------------------------------------------------------
But I'm having a problem in-game/out-of game when ever I actually run the program I get an error with this code,
Code:
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
If GetAsyncKeyState(Keys.Q) Then
SendKeys.Send("{Q}")
SendKeys.Send("{Q}")
Status.Text = "Quicking!"
Else
Status.Text = "Waiting for input..."
End If
End Sub
Anyone mind helping? :/