Sign in to follow this  
Followers 0
IhanPrime

Mouse Hook Information?

5 posts in this topic

I can't quite seem to wrap my head around Hooks and DLLs. I can get the UDFs like _MouseSetOnEvent to do their job, but as far as understanding them and making my own code from them, I'm lost.

The end goal is to be able to Smooth out Mouse Movements for Photoshop and other art programs. Similar to LazyNezumi and ZBrush's Lazy Mouse. With the _MouseSetOnEvent UDF I'm able to block Mouse Input, but unable to process/send it anywhere. Other snippets I've come across through searching do the opposite; I can't block Mouse Input, only read it. I'm looking for a middle ground, where I can block, read, process, then send out Mouse Cords.

Any help would be greatly appreciated :huh2:. Keep in mind, I have decent AutoIT skills, but have a very poor understanding of Hooks and DLLs.

Share this post


Link to post
Share on other sites



I'm having a bit of trouble understanding what you need, thats not unusual since I dont really know what a hook is or does.

But can you not accomplish your goal with native autoit functions MouseGetPos() MouseMove() etc... ?


AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

You can convine all thouse UDFs... i sometimes use for fun only :huh2: the API function MouseEvent from a DllCall to move the mouse in absolute way whitout coords... you also can record the mouse movement that you want and find out some algorithm to reproduce that kind of movement

EDIT: As Far i can see(not to much) the Lazymouse uses algorithm... If you never saw that kind of algorithm, look the Fractal GDI+ example from UEZ

Edited by monoscout999

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

But can you not accomplish your goal with native autoit functions MouseGetPos() MouseMove() etc... ?

I'm worried about it being to slow, and I wouldn't be able to "block" user input from the mouse, only get it :alien:.

Edit: Although, now that I think about it, I suppose I don't need to "block" mouse input. But I do need to get the mouse data, and somehow have the clicks translate to a couple of pixels back from where the mouse actually is. Like dragging a line.

Posted Image

Here's a picture of what LazyNezumi does. See, real location of the mouse is at the red circle, but the program tells Windows to register the mouse click/drag at butt of that line instead of where the cursor is.

You can convine all thouse UDFs... i sometimes use for fun only ;) the API function MouseEvent from a DllCall to move the mouse in absolute way whitout coords... you also can record the mouse movement that you want and find out some algorithm to reproduce that kind of movement

EDIT: As Far i can see(not to much) the Lazymouse uses algorithm... If you never saw that kind of algorithm, look the Fractal GDI+ example from UEZ Some Graphical Examples Using GDI+

Cool, I'll check it out, thank you :huh2:. So it is possible then to do it, I'm not totally crazy?

Edited by IhanPrime

Share this post


Link to post
Share on other sites

see this and read the help because depends the OS version to work someway or another ---> BlockInput() function

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  
Followers 0