Bill413 Posted February 3, 2021 Posted February 3, 2021 Hi, very new to AutoIT first of all..., have been using "AutoIT Window Info" to script the pressing buttons by finding object, moving the curser around, using Combobox, all okay so far. However, I am struggling with the task of selecting an item in a ListBox, and clicking on it. ; Select Collection Point Button - THIS WORKS, but is not a ListBox $sWinTitle = "Unit Concern Pareto Reports" $sWinText = "Collection Point" WinActivate($sWinTitle,$sWinText) $handle = WinGetHandle($sWinTitle,$sWinText) ControlSend($handle,"","[CLASS:WindowsForms10.Window.8.app." & $sClass & "]","{DOWN 0}{ENTER}") sleep(1000) ; Select PD CAL GATE BUY OFF - NOT WORKING $sWinTitle = "Unit Concern Pareto Reports" $sWinText = "Collection Point" WinActivate($sWinTitle,$sWinText) $handle = WinGetHandle($sWinTitle,$sWinText) ControlSend($handle,"","[CLASS:WindowsForms10.LISTBOX.app." & $sClass & "]","{DOWN 2}{ENTER}") Tried a couple of other approaches from the forums (see below)… yet no success... hoping someone can offer an some hints, thank you ahead of time! ;$hWindow = WinGetHandle("Unit Concern Pareto Reports") ;$hControl = ControlGetHandle($hWindow, "", "[CLASS:WindowsForms10.Window.8.app.0.1ca0192_r9_ad1; INSTANCE:32]") ;ControlCommand($hWindow, "", $hControl, "SelectString", "PD CAL GATE BUY OFF") ; Change this ;#include <GuiListBox.au3> ;Dim $ttlWindow ;Dim $hdlWindow ;Dim $cidList ;Dim $hdlList ;$ttlWindow = "_lstDataCollectionAreas_0" ;$cidList = "[CLASS:WindowsForms10.LISTBOX.app.0.1ca0192_r9_ad1]" ;$hdlWindow = WinGetHandle($ttlWindow) ;$hdlList = ControlGetHandle($hdlWindow, "", $cidList) ;_GUICtrlListBox_ClickItem($hdlList, 1, "down")
Developers Jos Posted February 3, 2021 Developers Posted February 3, 2021 Moved to the appropriate forum. Moderation Team SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now