Jump to content
Sign in to follow this  
psychosis43

Locking Mouse/Trap Mouse?

Recommended Posts

The default dpi on my mouse is 1000 (too complicated to change). I like it to be fast because of my widescreen monitor, however it is too fast for drawing in microsoft paint.

I would like to perform an action where if left click is down, the mouse locks for an instance than unlocks. I figured this would apply more detail to my drawing by keeping the mouse steady.

Is this what Trap mouse would be used for? Or perhaps a block function? And can you use mouse_event for this task?

It should be fairly simple to make, im just confused XD

Edited by psychosis43

Share this post


Link to post
Share on other sites

Is this what Trap mouse would be used for? Or perhaps a block function? And can you use mouse_event for this task?

It should be fairly simple to make, im just confused XD

TRY IT. Try writing some code, and then post it here if you run into trouble.


"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Share this post


Link to post
Share on other sites

For trapping of cursor look at ClipCursor API function

http://msdn.microsoft.com/en-us/library/windows/desktop/ms648383%28v=vs.85%29.aspx

I'm sure there are some AU3 examples here on the forum just use Search ...

EDIT: Now I see that this API is implemented in standard _MouseTrap() UDF in standard Misc.au3 include file.

Edited by Zedna

Share this post


Link to post
Share on other sites

Thanks, and can I add a few things to the parameter such as how long it's trapped, which coords to trap it and make it universal(not just desktop applications but windowed applications)?

If I want to add the coords of the specified trap to anywhere I click on my screen would it be (0,0)? Do I also have to include my screen resolution as well, or is this irrelevant?

Would starting out the main functions of the script be something like:

using _isPressed() or leftdown then _MouseTrap()?

Edited by psychosis43

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...