Notifications
Clear all

[Closed] mouse tool question

I have made a scripted mouse tool, which works fine. When the user clicks it starts, when they click again it ends.

Now I want it to automatically start the tool whenever a they click and a certain variable is true. For instance, whenever a certain button is toggled, the tool will start each time they click.

How can I do this?

3 Replies

You can start a tool by calling

startTool <tool_name>

There is also a method called stopTool() but it didn’t work when I tried it in one of my last scripts.
For more parameters of the startTool method refer to the MaxScript help.

Chris

When you start the tool, the first click activates it. The second click ends the tool. Now I need the tool to be automatically started again so that the third click will activate it again, the 4th click will end it, the 5th click will activate it, etc.

EDIT – Nevermind, I was just being dumb

I would use a plugin that accepts more than 2 mouse clicks. Then I would stop the tool using #stop when the tool has completed the exit condition is true.

How did you solve the problem?