Mouse control
Author |
Message |
Raugrist
|
Posted: Tue Apr 13, 2004 4:07 pm Post subject: Mouse control |
|
|
Does anybody have any idea how I could make a program that controls the user's mouse and possibly simulate mouse clicks? You know how in a FPS when you move the mouse around to aim, the program understands that you moved the mouse in some direction, takes the necessary steps and then moves the mouse back (so you don't run into the edge of the screen).
How could I do that? |
|
|
|
|
|
Sponsor Sponsor
|
|
|
wtd
|
Posted: Tue Apr 13, 2004 5:41 pm Post subject: (No subject) |
|
|
It's entirely dependent on what environment you're programming in. Is it an X Windows (Linux, FreeBSD, Solaris, etc.) environment, a Windows environment, or within the context of .NET?
I'd reccomend siccing Google on this problem. |
|
|
|
|
|
Raugrist
|
Posted: Tue Apr 13, 2004 7:45 pm Post subject: (No subject) |
|
|
I was thinking windows, because I only just started Linux and the school computers are still on windows. But yeah, I guess google will be the way to go. |
|
|
|
|
|
scryed
|
Posted: Wed Apr 14, 2004 11:46 am Post subject: (No subject) |
|
|
If you are using MFC then just go to the class wizard, you will see events like WM_LBUTTONDOWN, WM_LBUTTONUP, WM_MOUSEMOVE. If you map a message to these then Windows will pass in a CPoint object.
If you are doing it from scratch it is a little harder but the messages are the same. |
|
|
|
|
|
Catalyst
|
|
|
|
|
|
|