Page 1 of 1

Pixel level precision mouse aiming with kb  Topic is solved

Posted: 17 May 2018, 10:04
by Guest
Greetings,
I wanted to make a script which would allow me to move the cursor by exactly 1 onscreen pixel for an fps-like game (specifically War Thunder), and came up with this, working one:
Spoiler
All the 3 lines in the else block work properly on most environment; the sad part is all the 3 ways, both with and without screen coord mode, don't work inside Warthunder, and behave weirdly. Ingame the camera will start moving like crazy in pointless directions (more like opposing to the Keys pressed) AND by amounts which are definitely NOT 1 pixel.

I was thinking that MAYBE the game captures physical input to mouse and forces the cursor to stay in middle, hence moving cursor coordinates from outside would cause the game to apply the reverse movement ignoring what my script does, since there's no physical input detected.

Is there any way to send to the running game a "mouse movement" signal rather than moving its coordinates?

Re: Pixel level precision mouse aiming with kb

Posted: 17 May 2018, 11:19
by swagfag
MouseMove with the 'R' flag

or look on msdn for mouse_event or SendInput()

Re: Pixel level precision mouse aiming with kb

Posted: 17 May 2018, 12:23
by Guest
swagfag wrote:MouseMove with the 'R' flag
That line sounds like "i've read only the title and not the post" :D

Thanks for the msdn advice.

Re: Pixel level precision mouse aiming with kb

Posted: 17 May 2018, 20:34
by Rangerbot