WideBoyDixon Posted May 28, 2009 Posted May 28, 2009 Very quickly, a way of locking down mouse movement to horizontal or vertical only. Use [Win]+Q to cycle horizontal, vertical and no lock. Useful for me when I'm re-arranging items on forms and I want to preserve the top or left coordinate. HotKeySet("#q", "_ToggleLock") Global $lockType = 0, $lastPos = MouseGetPos(), $thisPos While True $thisPos = MouseGetPos() Switch $lockType Case 1 ; Vertical lock $thisPos[1] = $lastPos[1] Case 2 ; Horizontal lock $thisPos[0] = $lastPos[0] EndSwitch MouseMove($thisPos[0], $thisPos[1], 0) $lastPos = $thisPos Sleep(10) WEnd Func _ToggleLock() $lockType = Mod($lockType + 1, 3) EndFunc ;==>_ToggleLock WBD [center]Wide by name, Wide by nature and Wide by girth[u]Scripts[/u]{Hot Folders} {Screen Calipers} {Screen Crosshairs} {Cross-Process Subclassing} {GDI+ Clock} {ASCII Art Signatures}{Another GDI+ Clock} {Desktop Goldfish} {Game of Life} {3D Pie Chart} {Stock Tracker}[u]UDFs[/u]{_FileReplaceText} {_ArrayCompare} {_ToBase}~ My Scripts On Google Code ~[/center]
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now