Jump to content

Selecting items in listbox

Recommended Posts


Hi, I've been looking through different threads on this subject, but I can't manage to find the correct solution for my case.

Here's the summary on the listbox i'm trying to select from: 

>>>> Control <<<<
Class:    WindowsForms10.LISTBOX.app.0.34f5582_r11_ad1
Instance:    18
ClassnameNN:    WindowsForms10.LISTBOX.app.0.34f5582_r11_ad118
Name:    operationsListBox
Advanced (Class):    [NAME:operationsListBox]
ID:    2299294
Position:    7, 62
Size:    194, 628
ControlClick Coords:    132, 133
Style:    0x560108C1
ExStyle:    0x00000200
Handle:    0x000000000023159E


here's what I've written so far:

#include <GuiListBox.au3>

Run(@comspec & " /c " & chr(34) & "*:\*\*\*.appref-ms" & chr(34))

Local $hWnd = WinWaitActive("*name of application*", "", 10)

ControlFocus($hWnd, "", "WindowsForms10.LISTBOX.app.0.34f5582_r11_ad118")

_GUICtrlListBox_ClickItem("[NAME:operationsListBox]", 6, "left")


When I run the script, instead of selecting the 7th item in the listbox, it simply clicks the top left corner of the monitor.

Any help would be appreciated.


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now