Page 1 of 1

Reading mouse input alternatives to 'mousegetpos'

Posted: 20 Oct 2021, 20:41
by mikhail22
I suppose the answer is "no", but maybe I missed something on this topic, so is it possible
to somehow read the (relative) mouse movement other than just reading via 'mousegetpos'?

The problem with 'mousegetpos' is that it is bound to the screen and will obviosly stop changing
on the screen border, but I need to read the mouse input regardless of the screen cursor.
Also if I use 'Blockinput MouseMove' then it affects the 'mousegetpos' so again, I can't read
mouse input if I block the cursor movement. Is ther any way to overcome this limitation?

Re: Reading mouse input alternatives to 'mousegetpos'

Posted: 20 Oct 2021, 21:16
by SirSocks
Did you try using a CoordMode statement?
This should detect mouse movement on the border of a screen. For example, If your mouse is at the very top of the screen, and you move it side to side, you'll have no change in the "y" value, but the "x" value should change.

Code: Select all

CoordMode, Mouse, Screen
MouseGetPos, OutputVarX, OutputVarY

Re: Reading mouse input alternatives to 'mousegetpos'

Posted: 20 Oct 2021, 21:27
by mikeyww
I believe that the question is how to read the device's output rather than the cursor position.

Re: Reading mouse input alternatives to 'mousegetpos'

Posted: 20 Oct 2021, 21:44
by mikhail22
mikeyww wrote:
20 Oct 2021, 21:27
I believe that the question is how to read the device's output rather than the cursor position.
Yes, exactly, I want to read the mouse input even if the cursor it is 'stuck' on the border of the screen.
And accordingly, I want to read the mouse input if I block the cursor with 'Blockinput' statement.
I suppose it is currently not possible, but maybe there are some ideas on this.
Maybe there is some some public Windows system variable that exposes this information.
I believe there should be some relative movement variable which is used by Windows to calculate the screen mouse cursor position.

Re: Reading mouse input alternatives to 'mousegetpos'

Posted: 21 Oct 2021, 05:12
by malcev