Get and set caret cursor position?

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
slishnevsky
Posts: 34
Joined: 07 Mar 2024, 06:50

Get and set caret cursor position?

18 May 2024, 11:58

I am talking about a keyboard, not a mouse.

Is there any way to get a caret position and then use it to set the cursor in that position before sending text?
slishnevsky
Posts: 34
Joined: 07 Mar 2024, 06:50

Re: Get and set caret cursor position?

18 May 2024, 12:02

This is the scenario...
image.png
image.png (73.59 KiB) Viewed 250 times
Before sending a text, I display a popup message using Gui.
Even if I don't display a message, the focus is going away often
How can I put a cursor back, so that I can send a text?
User avatar
Noitalommi_2
Posts: 295
Joined: 16 Aug 2023, 10:58

Re: Get and set caret cursor position?

19 May 2024, 01:39

Hi.

As you described, I think the "NoActivate" option when showing the gui is what you're looking for. NoActivate shows the Gui without activating it, so that the current keyboard focus is retained.
MyGui.Show("x0 y0 w200 h200 NoActivate")

Return to “Ask for Help (v2)”

Who is online

Users browsing this forum: Draken and 50 guests