[Maxscript] dotNet Mouse click (or up) on max viewport



Hi there.
I have been trying to catch mouse clicks or mouse up events on max viewport and I can’t use the mouse tool in maxscript .(Mouse tool interferes with the Quickslice tool in edtiable Poly )
I tried using “timer” with (dotNetClass “Control”).MouseButtons, but once the mouse is clicked it returns “left button pressed” event per timer interval.So I want to use a “mouse up” event but no luck finding one yet. What shuold I do?
Thanks in advance for the help…


See Kevin Vandecar’s post on how to use MouseCallbacks.


Thank You.
I will give it a try.

Nope It did nor worlk for me. :grinning:

Nevermind. I found the solution here

nope again it crashes max if you integrate it with quickslice.


We have had a poser tool that uses dotnet.
On normal key press it would apply the pose. On a prolonged button press it would open a UI for more advanced pose functionality.

I don’t see how this couldn’t be extended to use pyside if you are using 2017+ to give a more robust solution.

I will chat to the super smart chap who managed to get this working for us and feedback his insight.


Yes we are using 2017. Right now I am trying to find the solution in python.

Nope python crashes max when you try to get mouse clicks with pynput or mouse …