Is it possible to position the mouse cursor where text cursor is?

Discussion, questions and support.
Post Reply
User avatar
Oblomov
Posts: 184
Joined: Mar 4th, ’19, 19:44

Post by Oblomov » Feb 7th, ’20, 23:06

I was wondering, is it perhaps possible to have the mouse cursor move where the text cursor is or to a place that's close to it?

I want to be able to invoke the right-click menu on a word that's marked by a red squiggly line inside of Word. I already have a command that selects the first suggested correction, if I hover on the misspelled word with mouse and invoke it, but it would be super nice to be able to do that, without having to take the hand away from keyboard...
User avatar
Marko
Posts: 1719
Joined: Mar 2nd, ’13, 21:02

Post by Marko » Feb 8th, ’20, 10:08

Code: Select all

MouseMove, A_CaretX, A_CaretY
User avatar
Oblomov
Posts: 184
Joined: Mar 4th, ’19, 19:44

Post by Oblomov » Feb 8th, ’20, 13:27

Marko wrote: Feb 8th, ’20, 10:08

Code: Select all

MouseMove, A_CaretX, A_CaretY
Thanks for the reply! At the moment however, it seems to only be going to the left side of the screen when I execute the macro 🤔

Image
User avatar
Tom
Posts: 791
Joined: Nov 24th, ’15, 23:39

Post by Tom » Feb 8th, ’20, 13:36

It should work in majority of windows. However, caret position cannot be recognized in some applications and browsers (Windows limitation).
User avatar
Oblomov
Posts: 184
Joined: Mar 4th, ’19, 19:44

Post by Oblomov » Feb 8th, ’20, 19:48

Tom wrote: Feb 8th, ’20, 13:36 It should work in majority of windows. However, caret position cannot be recognized in some applications and browsers (Windows limitation).
Gotcha, will probably try to delve into some Autohotkey forums just in case 🐀
prasad383
Posts: 19
Joined: Oct 18th, ’19, 14:43

Post by prasad383 » Feb 9th, ’20, 03:02

I use following simple code. It selects first autocorrect suggestion if you're working in ms Word. No need to move mouse.

Send, {Appskey}
Sleep, 100
Send, {enter}
User avatar
Oblomov
Posts: 184
Joined: Mar 4th, ’19, 19:44

Post by Oblomov » Feb 9th, ’20, 07:36

prasad383 wrote: Feb 9th, ’20, 03:02 I use following simple code. It selects first autocorrect suggestion if you're working in ms Word. No need to move mouse.

Send, {Appskey}
Sleep, 100
Send, {enter}
Oh man, thanks! This is gonna help me a bunch
Post Reply