Is SendKeysToWindow a function you or someone wrote with the program commands or is it a Quick Macro function? When I try to use it I get this message – mesg2.png. Are you saying that it has to be written as a function in your code first, than you can use it? Are there any more examples you can show? I am taking it that you have to have pre-written SendKeysToWindow but I want to be clear. If the functions are being written first what is the relation to hwnd or is that just what you are naming them?
Your macro is possibly correct, but make sure that the child window is correct. It must be the same child window that is focused when the window is active. Can use this macro to capture focused child window.
Macro CaptureFocusedControl
Trigger CSAj
;Make the target window active and the child window focused. Then run this macro (Ctrl+Alt+Shift+J).
;It creates code to find the focused child window. Copy it from QM output and paste in macro where need.
RecGetWindowNamechild&_s outF"int hwnd={_s}"
SendKeysToWindow works with most windows, but not with all. May not work with many games because often they use some nonstandard method to get pressed keys.
At first try this: Make the target window active and the child window focused. Run this macro. If it does not work, SendKeysToWindow cannot be used.