Using Keyboard to Move Mouse Cursor around Lines on Screen

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
rokkyboy
Posts: 16
Joined: 01 Sep 2017, 07:04

Using Keyboard to Move Mouse Cursor around Lines on Screen

03 Sep 2017, 05:57

Hello,

I had an interesting Idea. I work in the Architecture/Engineering/Construction, known as the AEC industry. They spend a lot of time with drawings, picking points to select lines and others. As you can imagine this is very non-ergonomic for your wrist.

Image Recognition Mouse Movement.JPG
Image Recognition Mouse Movement.JPG (67.37 KiB) Viewed 491 times

Would it be possible to write a script, using some sort of OCR, to have the mouse cursor start at a position and press a key to have the cursor move around the lines? To perfect this would be complex as there are many variants to line-width, circles, and etc but simple to move until you hit a corner would make things a lot easier and help people.

Any ideas?
HotKeyIt
Posts: 2364
Joined: 29 Sep 2013, 18:35
Contact:

Re: Using Keyboard to Move Mouse Cursor around Lines on Screen

03 Sep 2017, 08:09

Here is something to start with, press WinKey+Left/Right/Up/Down to follow the line:

Code: Select all

SetBatchLines,-1
CoordMode,Mouse,Screen
CoordMode,Pixel,Screen
Return
#Left::
#Right::
#Up::
#Down::
	Loop {
		MouseGetPos,mx,my
		ax:=mx+(A_ThisHotkey="#Left"?-1:A_ThisHotkey="#Right"?1:0)
		ay:=my+(A_ThisHotkey="#Up"?-1:A_ThisHotkey="#Down"?1:0)
		PixelSearch,x,y,% ax,% ay, % ax,% ay,0x000000,50, Fast
		If ErrorLevel
			break
		MouseMove,% x,% y, 0
	}
Return
rokkyboy
Posts: 16
Joined: 01 Sep 2017, 07:04

Re: Using Keyboard to Move Mouse Cursor around Lines on Screen

04 Sep 2017, 18:11

HotKeyIt wrote:Here is something to start with, press WinKey+Left/Right/Up/Down to follow the line:

Wow Thanks! Didn't think it would be this simple to get the idea started. Thank you!

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: mstrauss2021 and 328 guests