CaptainBeardsEyesBeard Posted February 5, 2019 Posted February 5, 2019 Hi I'm trying to run through a combo box and had a search on google but couldn't find too much and thought maybe it's just best to post here. So I want to do the below Local $hWnd1 = WinWait("[CLASS:ProFrame]", "", 10) ControlClick($hWnd1, "", "ComboBox1") While 1 Send("{DOWN}") $ctext=ControlGetText("Find Case","","ComboBox1") If $ctext="Elite Matter Number (Elite Matter Screen)" Then ExitLoop EndIf WEnd And this is the autoit window. At the moment it just crashes my application
FrancescoDiMuro Posted February 5, 2019 Posted February 5, 2019 (edited) @CaptainBeardsEyesBeard Once you get the handle od the ComboBox, you can use _GUICtrl_ComboBox* functions Edited February 5, 2019 by FrancescoDiMuro Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette
CaptainBeardsEyesBeard Posted February 5, 2019 Author Posted February 5, 2019 Cheers, so how would I use _GUOCtrl_ComboBox to find the entry in the combo box I want?
FrancescoDiMuro Posted February 5, 2019 Posted February 5, 2019 @CaptainBeardsEyesBeard If you look at _GUICtrlComboBox_* functions in the Help file, you'll find the one that fits your needs Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette
CaptainBeardsEyesBeard Posted February 5, 2019 Author Posted February 5, 2019 So something like this right? Navigation_Click_Search_Icon() Sleep(1000) Local $wHnd = WinActivate("Find Case") ; Focus Elite window If $wHnd Then Else MsgBox($MB_SYSTEMMODAL, "Error", "blah blah") Exit EndIf Sleep(1000) Local $hWnd1 = WinWait("[CLASS:ProFrame]", "", 10) _GUICtrlComboBox_SetCurSel($hWnd1, 2) EndFunc It doesn't work at mo
Nine Posted February 5, 2019 Posted February 5, 2019 The first param of _GUICtrlComboBox_SetCurSel must be the handle of the combo not the handle of the window. “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
CaptainBeardsEyesBeard Posted February 6, 2019 Author Posted February 6, 2019 Right so it would be this? Local $hWnd1 = WinWait("[CLASS:ProFrame]", "", 10) $hComBo=ControlGetHandle($hWnd1, "", "ComboBox1") Sleep(1000) _GUICtrlComboBox_SetCurSel($hComBo, 2) I'm getting this in the console at the moment "C:\Automation_Solcase\Tests\Test3_AddressBook_Agenda_History_BWLS.au3" (23) : ==> Unknown function name.: _GUICtrlComboBox_SetCurSel($hComBo, 2) ^ ERROR
CaptainBeardsEyesBeard Posted February 6, 2019 Author Posted February 6, 2019 Not to worry just realised I hadn't included the header file #include <GuiComboBox.au3> That's working now thanks
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