Hello, new to AutoIt. As far as I can tell, there is no direct way to activate a child window.
The following function will correctly activate the child window, however, the child window text needs to be an exact match.
WinTitleMatchMode does not seem to apply or help in this case.
Thanks for any help!
EDIT for clarification: WinTitleMatchMode will only apply to the Main Window in: ChildActivate("Main Window", "Child Window")
The following function will correctly activate the child window, however, the child window text needs to be an exact match.
WinTitleMatchMode does not seem to apply or help in this case.
Thanks for any help!
#include <WinAPI.au3> Func ChildActivate($appTitle, $formName) AutoItSetOption("WinTitleMatchMode", 2) $hWnd = WinGetHandle($appTitle, $formName) $array = WinList($appTitle) WinActive($hWnd) $winarray = _WinAPI_EnumWindows(True, $hWnd) For $i = 1 to $winarray[0][0] $title = _WinAPI_GetWindowText($winarray[$i][0]) If ($title == $formName) or ($title == $formName & " *") Then _WinAPI_ShowWindow($winarray[$i][0], @SW_MAXIMIZE) _WinAPI_ShowWindow($winarray[$i][0], @SW_SHOWNORMAL) EndIf Next EndFunc
EDIT for clarification: WinTitleMatchMode will only apply to the Main Window in: ChildActivate("Main Window", "Child Window")