MouseMover: Pixel-Perfect Pointer Precision!

Post your working scripts, libraries and tools for AHK v1.1 and older
User avatar
Hactar
Posts: 12
Joined: 23 Jul 2015, 20:59

MouseMover: Pixel-Perfect Pointer Precision!

25 Jul 2015, 12:56

IMPORTANT: Since Win10, BlockInput MouseMove (which this program requires for it's core feature) no longer works! Hopefully this will be fixed in a soon AHK version, but until then this program doesn't freeze your mouse. :( (It can still move it by one pixel at a time.) Apparently that problem went away on it's own. Never mind then...

Maybe I'm the only crazy person out there who likes pixel-perfect pointer positioning precision. XD

HOW TO USE:
• Press [Ctrl] + [Win] + [M] (or any other hotkey you choose) to freeze/unfreeze your mouse.
• While it is frozen, you can use WASD or the arrow keys to move it by one pixel at a time.
• Hold down [Ctrl] to move your mouse by ten pixels at a time
• Hold down [Shift] to move it by 100 pixels at a time.

That's really all there is too it...

MouseMover.ahk (#Include after auto-execute section if used with another script)

Code: Select all

#MaxHotkeysPerInterval 200		; Allows for rapid fire hotkeys (recommended, but not required)

^#m::
	Suspend On
	If ( MouseMover := !MouseMover ) {
		BlockInput MouseMove
		SoundBeep, 523.251, 100
		SoundBeep, 783.991, 100
	} Else {
		BlockInput MouseMoveOff
		SoundBeep, 783.991, 100
		SoundBeep, 523.251, 100
	}
	Suspend Off
Return

#If MouseMover

	w::
	Up::MouseMove 0, -1, , R
	s::
	Down::MouseMove 0, 1, , R
	a::
	Left::MouseMove -1, 0, , R
	d::
	Right::MouseMove 1, 0, , R
	
	^w::
	^Up::MouseMove 0, -10, , R
	^s::
	^Down::MouseMove 0, 10, , R
	^a::
	^Left::MouseMove -10, 0, , R
	^d::
	^Right::MouseMove 10, 0, , R
	
	+w::
	+Up::MouseMove 0, -100, , R
	+s::
	+Down::MouseMove 0, 100, , R
	+a::
	+Left::MouseMove -100, 0, , R
	+d::
	+Right::MouseMove 100, 0, , R
	
#If
Oh, and it makes funny beeping noises too! :D
Last edited by Hactar on 29 Jul 2015, 20:41, edited 3 times in total.
ozzii
Posts: 481
Joined: 30 Oct 2013, 06:04

Re: MouseMover: Pixel-Perfect Pointer Precision!

27 Jul 2015, 02:48

Cool.
If I may a suggestion:
Have the position of the mouse in a tooltip.
And maybe also the color under the mouse.
User avatar
WAZAAAAA
Posts: 88
Joined: 13 Jan 2015, 19:48

Re: MouseMover: Pixel-Perfect Pointer Precision!

17 Oct 2015, 23:43

Pretty cool, thanks for the script, I've used it.

But why did you write these:
SoundBeep, 523.251, 100
SoundBeep, 783.991, 100


instead of just these?
SoundBeep, 523, 100
SoundBeep, 783, 100


And what about that lonely #If in the end? lol
YOU'RE NOT ALEXANDER
User avatar
boiler
Posts: 16925
Joined: 21 Dec 2014, 02:44

Re: MouseMover: Pixel-Perfect Pointer Precision!

18 Oct 2015, 07:35

The lonely #If is there so that his earlier #If condition won't apply to any other hotkey definitions that might be added after it. Even though he doesn't have any more currently, it's good practice to do that so he doesn't have to remember later if he does add some.
JJohnston2
Posts: 204
Joined: 24 Jun 2015, 23:38

Re: MouseMover: Pixel-Perfect Pointer Precision!

25 Oct 2015, 04:22

Those particular frequencies are musical notes... C & G... probably copy/pasted somewhere else vs. coded from scratch.
User avatar
Hactar
Posts: 12
Joined: 23 Jul 2015, 20:59

Re: MouseMover: Pixel-Perfect Pointer Precision!

13 Mar 2016, 06:58

WAZAAAAA wrote:But why did you write these:
SoundBeep, 523.251, 100
SoundBeep, 783.991, 100


instead of just these?
SoundBeep, 523, 100
SoundBeep, 783, 100
JJohnston2 wrote:Those particular frequencies are musical notes... C & G... probably copy/pasted somewhere else vs. coded from scratch.
Yes, I just copy-pasted the notes from Wikipedia and didn't know why I should bother truncating them. AutoHotkey does take decimal input for those, even if it makes very little or no difference in the sound that comes out. I'm not really sure why I left three decimals in there...
User avatar
kunkel321
Posts: 1047
Joined: 30 Nov 2015, 21:19

Re: MouseMover: Pixel-Perfect Pointer Precision!

16 Mar 2016, 16:14

Pretty cool idea! I didn't even know I needed this until you posted it!
ste(phen|ve) kunkel

Return to “Scripts and Functions (v1)”

Who is online

Users browsing this forum: No registered users and 204 guests