Jump to content
Sign in to follow this  
xbtsw

any function can only block mouse but not keyboard?

Recommended Posts

xbtsw

there is a function named blockinput() in autoit, can block both mouse and keyboard in same time, and meanwhile, the script can control the mouse using mousemove() and mouseclick().

is there any way that can only block mouse but keyboard is not blocked at the same time? because i hope i can use a hotkey to control my script, and block mouse to avoid error.

i have tried _mousetrap(), but when the mouse is trapped, the mousemove() and mouseclick() functions doesn't work, as they can't move the mouse too. :)

Share this post


Link to post
Share on other sites
qazwsx

Try using mouse trap and control click. I dont think control click actually requires the mouse to move.

Share this post


Link to post
Share on other sites
xbtsw

Try using mouse trap and control click. I dont think control click actually requires the mouse to move.

Thanks, Controlclick & mousetrap works in winxp :)

but when i apply controlclick in a 3dgame, i found i can't get the control ID :)

Share this post


Link to post
Share on other sites
xbtsw

I know its not the cleanest solution, but you can always unblock input just before you have to move the mouse, click a key, etc, and then blockinput again as soon as you are done.

Like I said, not graceful, but it works.

~Felanor

Thanks for your advise~

Yes, in one of my script i do it in this way, just finding a better solution~ :)

i am guessing that call some dll can block mouse along, but i don't know which dll to call

maybe it will be better for the autoit to separate blockinput to blockkeyboard and blockmouse:)

Edited by xbtsw

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.