After a lot of study and experimenting, I got 2 hotkey scripts going, the first got to the pop-up and the second one started at the left click and finished the job. However, I couldn't find an AutoHotkey way to get the mouse cursor over to the pop-up button. Focus was on the pop-up key I needed to push and I could Send, {ENTER} but that brought the profile up in place of the tree. I needed to do a right click to get the context menu so the profile would come up in a new tab.
I should mention that the pop-up comes up near the tree node clicked, that is, any where in the tree window. The pop-up's size is unpredictable as is the button location within the pop-up. A varying number of lines of text appear in the pop-up above the button and other information can be placed below the button in the pop-up. So, even if I could get the coordinates of the pop-up, I still wouldn't know where the button is horizontally.
Using the 2 hotkey scripts was an improvement on the manual method. Then I thought of a way to combine them. I put them together with a Sleep 2000 in between. This gave me enough time to slide the mouse over to the button manually and a one hotkey action. Even more improvement.
Code: Select all
MButton::
Click Left
Sleep 2000
Click Right
Send, {DOWN 1}
Send, {ENTER}
return
Code: Select all
MButton::
Click Left
sleep 500
ImageSearch, FoundX, FoundY, 0, 0, A_ScreenWidth, A_ScreenHeight, *100 C:\Users\...
if (ErrorLevel = 2)
MsgBox Could not conduct the search.
else if (ErrorLevel = 1)
MsgBox Icon could not be found on the screen.
Click, %FoundX% %FoundY%, Right
Send, {DOWN 1}
Send, {ENTER}
Send, {ESC}
return