Setting focus on a sub-window only, sending random instructions

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
blad4
Posts: 315
Joined: 07 Oct 2015, 11:06

Setting focus on a sub-window only, sending random instructions

10 Dec 2018, 06:03

I'm obviously getting something incredibly wrong, but the logic that is being performed is baffling me so much. How can the code send instructions to the desired window with only "ControlFocus, %output%"

My intention was simply to just activate the window so I can send a command to it. But at the moment it seems to have a peculiar string of commands send to it by simply sending the below, so something must be either wrong in my short code OR I don't get ControlFocus at all... most likely both.

Code: Select all

DllCall("SetCursorPos", int, 3190, int, 374)
MouseGetPos, , , , output
ControlFocus, %output%
blad4
Posts: 315
Joined: 07 Oct 2015, 11:06

Re: Setting focus on a sub-window only, sending random instructions

10 Dec 2018, 06:13

Ideally I was hoping that this worked:

Code: Select all

DllCall("SetCursorPos", int, 3190, int, 374)
MouseGetPos, , , , output
;msgbox %output%        <--------- this confirms that MouseGetPos gets the correct control window
ControlSend, %output%, {F4} ; but this controlsend does not send to the control window, it just sends to the program itself

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Google [Bot] and 193 guests