So I'm trying trk on my auto clicker program in VB (visual basics 2008 express edition) and I'm trying to find a way to pause/stop the program with a right-click of the mouse, so you're not auto clicking EVERYTHING while you're trying to bring it back up. (I had a pretty hectic time stopping it)
Could anyone help me with this? It'd be greatly appreciated.
-Raivu
Edit: I've tried
(Timer1 is the clicker)If e.keycode = keys.space then
timer1.stop()
End If
And I've also tried the mouse functions, but I don't know a lot about those yet, so whether or not I was doing it correctly, I'm not sure.
Results 1 to 14 of 14
Thread: [VB] Need Help with something
- 04 Apr. 2010 11:50am #1
- Age
- 34
- Join Date
- Nov. 2009
- Location
- Everywhere. I have the internet
- Posts
- 4,100
- Reputation
- 440
- LCash
- 200.00
[VB] Need Help with something
Last edited by Raivu; 04 Apr. 2010 at 11:54am.
☜(* x *)☞FOOL ON COOL GENERATION
Originally Posted by C0FF1NCASE
- 04 Apr. 2010 11:59am #2
Ive never really worked with the mouse much, BUT. You could try hotkeys. Such as, F2 to start, F3 to finish.
I dont have anything trk off right now, because I just reformatted and im learning PHP, but try googling for the code.
Hope i helped
~BmanShh, I'm watching My little pony.
- 04 Apr. 2010 12:04pm #3
- Age
- 34
- Join Date
- Nov. 2009
- Location
- Everywhere. I have the internet
- Posts
- 4,100
- Reputation
- 440
- LCash
- 100.00
☜(* x *)☞FOOL ON COOL GENERATION
Originally Posted by C0FF1NCASE
- 04 Apr. 2010 12:43pm #4
No problem
If you need anymore help drop me a PM.
Also, check out for tutorials on youtube and google about hotkeys.
Thats what I done when I first started VB.NetShh, I'm watching My little pony.
- 04 Apr. 2010 04:46pm #5
Whats wrong with Send Keys?
Example:
Code:If (SendKeys.Equals(" ", " ")) Then MessageBox.Show("You have clicked space!", "Spacebar...", MessageBoxButtons.OK, MessageBoxIcon.Information) End If
Code:If (SendKeys.Equals(" ", " ")) Then Timer1.Enabled = False End If
Last edited by Eternal Darkness; 04 Apr. 2010 at 04:49pm.
- 04 Apr. 2010 04:55pm #6
Instead of using " "
Try using {SPACE} or something, I cant remember it exactly.Shh, I'm watching My little pony.
- 04 Apr. 2010 05:00pm #7
- 04 Apr. 2010 05:06pm #8
you need the either key up or key down function added to your project which you can do by clicking your control, then the lightning bolt in properties, then find key up and double click it.
Example
PHP Code:Private Sub Form1_KeyUp(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyUp
If (e.KeyData = Keys.Space) Then
your function goes here
End If
End Sub
End Class
- 04 Apr. 2010 08:41pm #9
- Age
- 34
- Join Date
- Nov. 2009
- Location
- Everywhere. I have the internet
- Posts
- 4,100
- Reputation
- 440
- LCash
- 100.00
☜(* x *)☞FOOL ON COOL GENERATION
Originally Posted by C0FF1NCASE
- 04 Apr. 2010 10:06pm #10
- 05 Apr. 2010 08:08pm #11
Wanna try:
Code:Private Sub Form1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Me.KeyPress If Asc(e.KeyChar) = Keys.Space Then timer1.stop() End If End Sub
- 05 Apr. 2010 09:00pm #12
- Age
- 34
- Join Date
- Nov. 2009
- Location
- Everywhere. I have the internet
- Posts
- 4,100
- Reputation
- 440
- LCash
- 100.00
☜(* x *)☞FOOL ON COOL GENERATION
Originally Posted by C0FF1NCASE
- 05 Apr. 2010 09:19pm #13
Asc is a key hook that is exactly like KeyUP or KeyDOWN event but global. It uses more memory to use and can drain you as well as has to be used in a timer. KeyUp or KeyDown is an event that doesn't need a timer yet it's not global.
- 06 Apr. 2010 01:04pm #14
- Age
- 34
- Join Date
- Nov. 2009
- Location
- Everywhere. I have the internet
- Posts
- 4,100
- Reputation
- 440
- LCash
- 100.00
☜(* x *)☞FOOL ON COOL GENERATION
Originally Posted by C0FF1NCASE