Jump to content
Sign in to follow this  
psychosis43

Locking Mouse/Trap Mouse?

Recommended Posts

psychosis43

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
psychosis43

Bump, I can explain better if anyone needs

Share this post


Link to post
Share on other sites
psychosis43

Edit: double post, sorry

Edited by psychosis43

Share this post


Link to post
Share on other sites
psychosis43

I edited the topic for a better explanation, any help?

Share this post


Link to post
Share on other sites
JLogan3o13

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.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
Zedna

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
psychosis43

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  

×