08-11-2018, 02:28 AM
(This post was last modified: 10-24-2019, 01:40 AM by InterestedNewbie.)
I have created an executable of the following script:
I select text from a target application and then run the executable. It reads out the text correctly. But when it's done reading the target application does not regain focus.
How do I regain focus of that application? A Windows activation command for a specific application is not going to work because my utility needs to work in any application (browser, text editor etc.).
I tried a mouse center command.
It works to reactivate the application, however it changes (doesn't restore) the text cursor location.
Any ideas would be welcome.
Nevermind, already figured it out
. A simple:
was enough to activate the target window again.
I select text from a target application and then run the executable. It reads out the text correctly. But when it's done reading the target application does not regain focus.
How do I regain focus of that application? A Windows activation command for a specific application is not going to work because my utility needs to work in any application (browser, text editor etc.).
I tried a mouse center command.
It works to reactivate the application, however it changes (doesn't restore) the text cursor location.
Any ideas would be welcome.
Nevermind, already figured it out

was enough to activate the target window again.