I want to capture my mouse :)

Goran K's icon

Seriously, it's not a euphemism.

Is it possible to capture the mouse pointer in Max? I'm using [hi] to control an animation with the mouse but I don't want the pointer to wander around and show up on the secondary display, which in fact is a projection screen.

Goran

Source Audio's icon

to capture mouse movements as coordinates
into a list, like coll, text etc using for example mousestate object
or output of your hi object -
(makes me wonder why you have to use hi for that)
or even seq, mtr , whatever, is easy.
then you play it back to drive that animation ,
if I understand correctly what you are asking for ?

To prevent mouse to be seen on any screen ...
there are few options,
a simple one is to hide or show mouse globally using messages to max
;
max hidecursor

or
;
max showcursor

------
or then try 11clicks external which has more options for hiding mouse
like anything on that projection screen

Goran K's icon

Thanks for your quick reply!

Sorry if I was unclear ... All I need is to hide the mouse cursor globally, and thanks for the tip about the ;max messages; I've learnt something new!

However, I see that the cursor reappears whenever I exit the Max window. Do you know if it can be prevented from doing so?

I'll also have a look at the external you mentioned.

11OLSEN's icon

11clicks is also not hiding it globally. Only above the patcher.

Source Audio's icon

max hidecursor is what it says - hides cursor as long as max is
foreground application.
that makes sense.
Do you want to hide mouse pointer system wide ?

Goran K's icon

I'm actually after a 'videogame' behaviour: a windowed game will often capture the mouse to use it as an in-game controller, disallowing it to interact with the UI outside the game (and often not even in-game, as it is exclusively reserved for movement and action purposes). The mouse is only released after a certain keyboard command is received (Esc, cmd-tab, etc.).

I believe a term such as 'locking' or 'reserving' a hardware resource may be more common.

Goran K's icon

Ha! Got it :) All it took was RTFM. Here's the code for future reference.

Max Patch
Copy patch and select New From Clipboard in Max.