Jump to content
Sign in to follow this  
NerdFencer

Mouse UDF

Recommended Posts

NerdFencer

Here is a Mouse UDF Lib that I made (mainly out of dislike for _MouseTrap)

This is primarily an interface between the windows DLL functions for the mouse and AutoIt, so don't shoot me for unoriginality...

Functions:

_MouseButtonSwap

_MouseShowCursor

_MouseGetPos

_MouseSetPos

_MouseGetDoubleClickTime

_MouseSetDoubleClickTime

_MouseGetCapture

_MouseReleaseCapture

_MouseSetCapture

_MouseGetButton

_MouseSetTrap

_MouseReleaseTrap

_MouseGetTrap

Notes:

> _MouseSetTrap behaves differently than the _MouseTrap Function built into Misc.au3. Given blank strings in parameters, it will set those values to the extreme edges of the screen, not to its opposing value +1. You also need to call _MouseReleaseTrap to release the trap, these really should have been separate in the Misc UDF as they are different actions requiring different calls.

> In reguards to _MouseSetPos, yes this can be done with the MouseMove function, but I figured it couldn't hurt to throw it in.

> _MouseGetPos is more useful than MouseGetPos in some cases because it returns an array with both, not just x or y. (EX: Storing mouse position for replay later)

Hopefully this will prove useful.

Mouse.au3


_________[u]UDFs[/u]_________-Mouse UDF-Math UDF-Misc Constants-Uninstaller Shell

Share this post


Link to post
Share on other sites
FireFox

@NerdFencer

@WindowsDir&"\system32\user32.dll" ;your code
'user32.dll' ;works too without path

Cheers, FireFox.

Edited by FireFox

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

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.