What is the most reliable way to control an inactive windows control?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
hellen_dorandt89
Posts: 25
Joined: 05 Jan 2022, 08:25

What is the most reliable way to control an inactive windows control?

Post by hellen_dorandt89 » 21 May 2022, 08:21

I know several things about these programs:
- They are native windows GUI that AHK can interact with via ControlSet etc
- The controls are always visible on their respective windows

Lets say I want to send a string of text C:/Users/User1/Documents to a control called Edit2 part of an inactive window and also simulate Enter for execute. How do I guarentee its always succefull or atleast 95% of the time? I am looking to do these kinds of operations in many different contexts.

I am essentially worried of the proccess being interupted and getting inconsistent results, I know of only BlockInput that could help me here. Is there anything that I should know? or am I going about this the wrong way and perhaps there is a better way to do this?

I have taken the liberty to crosspost this question on other forums as well.
Any help would be greatly appreciated!

User avatar
mikeyww
Posts: 26593
Joined: 09 Sep 2014, 18:38

Re: What is the most reliable way to control an inactive windows control?

Post by mikeyww » 21 May 2022, 09:48

You might need to leverage AutoHotkey's money-back guarantee here. :)

Try :arrow: ControlSend. You can test it in Notepad-- straightforward. Example

Some windows do not respond to ControlSend.

hellen_dorandt89
Posts: 25
Joined: 05 Jan 2022, 08:25

Re: What is the most reliable way to control an inactive windows control?

Post by hellen_dorandt89 » 21 May 2022, 16:23

mikeyww wrote:
21 May 2022, 09:48
You might need to leverage AutoHotkey's money-back guarantee here. :)

Try :arrow: ControlSend. You can test it in Notepad-- straightforward. Example

Some windows do not respond to ControlSend.
Hehe quite true, I will get to bashing then! Thanks Mikey!

Post Reply

Return to “Ask for Help (v1)”