I need to find the control's name to which its tooltip is linked. I'm asking this because I need to control click within TeamCenter 10, but the control names keep changing just as you click on any of them. This makes it difficult to keep my code running smoothly when I need to repeat tasks.
If there is a better way of doing this (in Autohotkey), please let me know.
You can try this (Replace title of TeamCenter 10
with the exact title of the TeamCenter window as shown in Window Spy):
F1::
; Retrieve the control name for each control in a window:
WinGet, List, ControlList, title of TeamCenter 10
; Examine the individual control names one by one, using a parsing loop:
Loop, Parse, List, `n
{
If InStr(A_LoopField, "SWT_Window02") ; use only the part of the control name that is always shown in Window Spy
ControlClick, %A_LoopField%, title of TeamCenter 10
break
}
return