Get X,Y coordinates after pressing global send key down (or up)

riderc1

Member
I am working with an obtuse Win32 client. It has what looks like a combo box, except its not. It actually has three different trees to display data. I currently have BP right clicking on the drop down menu and selecting a control to make the data look more like a combo box (otherwise, it has nested trees).
I am able to click on the "combo" to make it drop down. I then use Global Send Key {DOWN} to navigate the cursor down.
When I find the correct entry, I am supposed to click on the selected text and this puts a check box next to it.
However, I cannot figure out how to click on the selected text!
I've been player with a Read Stage to try to get the current X,Y location of the cursor (ie - when I click the down arrow key, I'm trying to get that location). If I have X,Y, I think I could then do a Mouse Click Center to select the item.

There are no apparent keyboard short cuts with this control. The Win32 class name is called CheckListTree (but pretty sure it's not a standard Win32 class).
I've spent most of my time with Accessibility. Win32 mode doesn't recognize the drop-down.
To make it even more fun, there are over 70 items in this drop down.

I'm also trying to find a way to read the text where the cursor is at. Unlike a regular combo box, the text field does not change as I move up/down the list. I must click on an entry before it shows up.
 

VJR

Well-Known Member
I am able to click on the "combo" to make it drop down. I then use Global Send Key {DOWN} to navigate the cursor down.
When I find the correct entry, I am supposed to click on the selected text and this puts a check box next to it.
However, I cannot figure out how to click on the selected text!
To select the checkboxes try sending a space when on it - just a space between double quotes " " in the Send Keys parameter. Also try the Enter key. At first you can manually try which of these keys marks the checkbox and then use its equivalent Sendkeys.

Also, try each of these keys with both 'Sendkeys Events' as well as 'Sendkeys'.
Make sure to give appropriate Wait stages after the up and down. Just because it does not work in the first instance do not consider that it does not work. Do some trial and error.

If after all your research it does not work as expected are you able to give a visual representation of the element you are referring about?
 

riderc1

Member
Unfortunately, this control does not seem to allow any keyboard presses to select an entry. I spent time trying every single keypress (include shift and ctrl presses). Normally, Space or Enter works. Not this one. Here are a few screenshots - I blurred out some details as the text might be confidential.
The control is called a CheckListTree. It has three modes of operation - tree with sub lists, tree with less sub lists, or a flat out list. I thought the list would be easier to work with.

This is the Tree with sub lists. At the high level, it is basically a City with assets beneath it.
View attachment WOTreeList.png

If you right click on this menu, you can change how the data is shown. I am able to right click and change to Listed Alphabetically.
View attachment WOTreeList2.png
Finally, this is the alphabetically list.

View attachment WOTreeList3.png
You will notice there is an X, Check and Empty square at the bottom of the menu. The X cancels the menu. The Checkbox selects all. The empty box deselects all. My Process does click on the "deselect all" square as I need to do these individually.

I've tried spying this with Win32 mode (doesn't lets me see the drop-down menu), Active Accessibility (this does let me spy the menu and I can use the arrow keys to go up/down), UI Automation also lets me spy it and go up/down. Just need to find that magic button that lets me left click since I haven't found a keyboard shortcut to select.
 
Top