Word does not show cursor / selection if it is not the active window - how to make it think it is?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Spitzi
Posts: 309
Joined: 24 Feb 2022, 03:45

Word does not show cursor / selection if it is not the active window - how to make it think it is?

Post by Spitzi » 27 Mar 2023, 06:42

Hi there.

I have a skript that sends vba code to word via com interface to write stuff into the document, all while working in another program that has the focus / is the active window.
It sucks to not see the cursor or selection in word, when it does not have the focus. It seems to be a standart behaviour of word, that I would like to overcome.

In this link https://superuser.com/questions/637221/how-to-keep-selected-text-highlighted-when-focus-changes-in-microsoft-word-excel, an aswer suggests, that you could word make somehow think it still has the focus and hence show cursor/selection, even if another program is active.

Is there a way to accomplish this in ahk?

Thanks for any ideas. Greets

Return to “Ask for Help (v1)”