yeekyj1 Posted July 19, 2007 Posted July 19, 2007 anyone know how to work with comboLbox?I'm having problem with it.I'm having problem retrieving items listed inside a comboLbox and thus clicking on it.would appreciate if you all could help me...thanks!
PsaltyDS Posted July 19, 2007 Posted July 19, 2007 anyone know how to work with comboLbox?I'm having problem with it.I'm having problem retrieving items listed inside a comboLbox and thus clicking on it.would appreciate if you all could help me...thanks!Check the help file for the _GuiCtrlCombo* functions. Post short demo code if you need more specific help. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
yeekyj1 Posted July 20, 2007 Author Posted July 20, 2007 Check the help file for the _GuiCtrlCombo* functions. Post short demo code if you need more specific help. hi psaltyds, thanks for your reply....coz I'm new to autoitscirpt so i dont know much about autoitscript....below is a few lines of mine codes on the combobox part...hope you can help me with it....thanks! ControlCommand ( "Change Directory", "", "ThunderRT6DriveListBox1", "ShowDropDown", "" ) Sleep(500) WinActivate("Change Directory", "c: [W3612]") Sleep(500) ControlCommand ( "Change Directory", "c: [W3612]", "ComboLBox1", "FindString", "d:" ) ControlCommand( "Change Directory", "", "ComboLBox1", "GetCurrentSelection", "") ControlClick("Change Directory", "", "ComboLBox1", "left", 1, 39, 48)
PsaltyDS Posted July 20, 2007 Posted July 20, 2007 hi psaltyds, thanks for your reply....coz I'm new to autoitscirpt so i dont know much about autoitscript....below is a few lines of mine codes on the combobox part...hope you can help me with it....thanks! ControlCommand ( "Change Directory", "", "ThunderRT6DriveListBox1", "ShowDropDown", "" ) Sleep(500) WinActivate("Change Directory", "c: [W3612]") Sleep(500) ControlCommand ( "Change Directory", "c: [W3612]", "ComboLBox1", "FindString", "d:" ) ControlCommand( "Change Directory", "", "ComboLBox1", "GetCurrentSelection", "") ControlClick("Change Directory", "", "ComboLBox1", "left", 1, 39, 48) Hmm... ComboLBox is a "special" case, if I recall. The help file for ControlCommand() specifically says: Certain commands that work on normal Combo and ListBoxes do not work on "ComboLBox" controls. Do you or anyone else know of a common app, or a freeware or open source one, that would use this control type for experimenting on? Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Ármányos Kő Posted February 1, 2008 Posted February 1, 2008 Hmm... ComboLBox is a "special" case, if I recall.The help file for ControlCommand() specifically says: Do you or anyone else know of a common app, or a freeware or open source one, that would use this control type for experimenting on? Hey,I am having troubles to click (or identify or select) a string in a given ComboLbox. The ComboLbox does not seem to have Window title, only handle. I am not sure if I will be able to get the handle.Anyway, you can see one application of this style of Control in Adobe Acrobat PDF printing properties/Layout/advanced. It is a SysTreeView32 window. Let me know please if anyone managed to solve the issue. PM please.
bafonso Posted February 8, 2008 Posted February 8, 2008 Hey,I am having troubles to click (or identify or select) a string in a given ComboLbox. The ComboLbox does not seem to have Window title, only handle. I am not sure if I will be able to get the handle.Anyway, you can see one application of this style of Control in Adobe Acrobat PDF printing properties/Layout/advanced. It is a SysTreeView32 window. Let me know please if anyone managed to solve the issue. PM please.Hi, has anyone managed to select text using a comboLbox ? I also need it
hvymetal Posted November 6, 2008 Posted November 6, 2008 Hi, has anyone managed to select text using a comboLbox ? I also need it I had the same problem here is function that I wrote to select a string from the comboxes' that use comboLbox. What it does is opens the dropdown listbox control in the combobox and sets the cursor in the listbox. This causes editbox portion of the combobox to update allowing you to read the string and compare it. #Include <GuiComboBox.au3> #Include <GuiEdit.au3> #Include <GuiListBox.au3> Func ComboLBox_SelectString($Window,$WindowText,$ControlID, $SelectString, $fPartialOK = True) Local $tInfo $returnVal=False $hCombo=ControlGetHandle($Window, $WindowText,$ControlID) If _GUICtrlComboBox_GetComboBoxInfo($hCombo, $tInfo) Then $hEdit=DllStructGetData($tInfo, "hEdit") $hList=DllStructGetData($tInfo, "hList") $EditTxt=_GUICtrlEdit_GetText($hEdit) If (((StringInStr($EditTxt, $SelectString)>0) AND $fPartialOK) Or((StringCompare($EditTxt, $SelectString)=0) AND NOT $fPartialOK)) Then $returnVal=True Else ;Open ListBox Control _GUICtrlComboBox_ShowDropDown($hCombo, True) ;Find SetText and Select $i=0 $ListEnd=_GUICtrlListBox_GetCount($hList) - 1 While($i<=$ListEnd AND NOT $returnVal) _GUICtrlListBox_SetCurSel($hList,$i) $EditTxt=_GUICtrlEdit_GetText($hEdit) If (((StringInStr($EditTxt, $SelectString)>0) AND $fPartialOK) Or((StringCompare($EditTxt, $SelectString)=0) AND NOT $fPartialOK)) Then $returnVal=True _GUICtrlListBox_ClickItem($hList,$i) EndIf $i=$i+1 WEnd _GUICtrlComboBox_ShowDropDown($hCombo, False) EndIf EndIf Return $returnVal EndFunc
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