How would I go about making a small program that keeps moving the mouse upwards?
For those who would like to know, tt's a tiny one-use thing. I'm playing Star Wars The Force Unleashed. In console versions, you would hold the right stick upwards. In the bad console port on the PC, you're using your mouse. Maybe you can understand my frustration.
SetCursorPos
will do this in unmanaged code. I'm not sure if there's a .NET method to do the same, but you can always use com interop. It's in User32.dll
[DllImport("user32.dll")]
static extern bool SetCursorPos(int X, int Y);
a little google produces this as a SetCursorPos equivalent for .net
System.Windows.Form.Cursor.Position
This is a problem for mechanical programming, not CSharp.
To execute the program, flip the power switch on the power strip the drill is plugged into.
Edit: if you want more portable code, use a cordless drill. Batteries not included.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With