Make mouse click
-
- Posts: 541
- Joined: Thu Feb 08, 2007 5:39 pm
- Location: NJ
Make mouse click
Does anyone know how to make it so when you click the mouse its like the mouse is constantly clicking like at 20 clicks a second or something.
Your mom became oversized. Please make your mom smaller before reposting.
Infern0 wrote:You just shave the excess bush and burn the leftovers.
Why would you want to do that?
Halo 2 Plugins | Lock-on To Just About Anything | My Sites | Snow Hog
Old Plugins you have, upgrade you must...
Always Maintain a High Quality-To-Crap Ratio.
- CompKronos
- Posts: 462
- Joined: Mon Sep 03, 2007 6:45 am
- Location: New Jersey
-
- Posts: 5426
- Joined: Sat Jul 24, 2004 12:12 pm
- Location: I'm a Paranoid
- Contact:
Wow people, just answer
It's not like you are the only persons in the world he could ask.
It's not like you are the only persons in the world he could ask.
Code: Select all
[DllImport("user32.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void mouse_event(long dwFlags, long dx, long dy, long cButtons, long dwExtraInfo);
private const int MOUSEEVENTF_LEFTDOWN = 0x02;
private const int MOUSEEVENTF_LEFTUP = 0x04;
private const int MOUSEEVENTF_RIGHTDOWN = 0x08;
private const int MOUSEEVENTF_RIGHTUP = 0x10;
Code: Select all
public void DoMouseClick()
{
//Call the imported function with the cursor's current position
int X = Cursor.Position.X;
int Y = Cursor.Position.Y;
mouse_event(MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_LEFTUP, X, Y, 0, 0);
}
...left for good
It was more that I thought there might have been a better way to achieve his goal depending on what it was...
Halo 2 Plugins | Lock-on To Just About Anything | My Sites | Snow Hog
Old Plugins you have, upgrade you must...
Always Maintain a High Quality-To-Crap Ratio.
-
- Posts: 541
- Joined: Thu Feb 08, 2007 5:39 pm
- Location: NJ
thanks
Wait, is this C# or C++ because dllimports keeps giving me an error:
Error 1 The type or namespace name 'DllImport' could not be found (are you missing a using directive or an assembly reference?) C:\Documents and Settings\Logan\Local Settings\Application Data\Temporary Projects\Auto Click\Form1.cs 21 10 Auto Click
Wait, is this C# or C++ because dllimports keeps giving me an error:
Error 1 The type or namespace name 'DllImport' could not be found (are you missing a using directive or an assembly reference?) C:\Documents and Settings\Logan\Local Settings\Application Data\Temporary Projects\Auto Click\Form1.cs 21 10 Auto Click
Your mom became oversized. Please make your mom smaller before reposting.
Infern0 wrote:You just shave the excess bush and burn the leftovers.
- LuxuriousMeat
- Posts: 824
- Joined: Thu Nov 03, 2005 6:43 pm
- Location: zzzzzzzzzzzzzzzz
- Contact:
Put this at the top of your code file.mr_penguin wrote:thanks
Wait, is this C# or C++ because dllimports keeps giving me an error:
Error 1 The type or namespace name 'DllImport' could not be found (are you missing a using directive or an assembly reference?) C:\Documents and Settings\Logan\Local Settings\Application Data\Temporary Projects\Auto Click\Form1.cs 21 10 Auto Click
Code: Select all
using System.Runtime.InteropServices;
-
- Posts: 5426
- Joined: Sat Jul 24, 2004 12:12 pm
- Location: I'm a Paranoid
- Contact:
I copy pasted it from a website and didn't check up with MSDN. Didn't even notice that the params were all long.kornman00 wrote:I would suggest you sharpen up your interop skills, mouse_event's parameters are all uint based. long is a no-no, especially for the last parameter which is a pointer which in mouse_event's case is 32bit.
...left for good