gigabyte Posted June 20, 2011 Share Posted June 20, 2011 (edited) Trying to use the following code to select a item from existing external application form dropdown but it just stays same. No change. Any idea what I am doing wrong #Include <GuiComboBoxEx.au3> WinWaitActive($title) $Index = _GUICtrlComboBoxEx_FindStringExact($hcombo, $sText) _GUICtrlComboBoxEx_SetCurSel($hcombo, $Index) or following WinWaitActive($title) $Index = _GUICtrlComboBox_FindStringExact($hcombo, $sText) _GUICtrlComboBox_SelectString($hcombo, $Index) Urgent help Edited June 20, 2011 by gigabyte Link to comment Share on other sites More sharing options...
Zedna Posted June 20, 2011 Share Posted June 20, 2011 $hcombo = ControlGetHandle(...) Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
gigabyte Posted June 20, 2011 Author Share Posted June 20, 2011 (edited) $hcombo = ControlGetHandle(...)Yes doing it like this but it doesn't make any difference. local $shcombo = ControlGetHandle($title, "", $hcombo)local $sText = 'TQW - Q00C00'WinWaitActive($title)$Index = _GUICtrlComboBox_FindStringExact($shcombo, $sText)_GUICtrlComboBox_SelectString($shcombo, $Index)Please also find related links and Edited June 20, 2011 by gigabyte Link to comment Share on other sites More sharing options...
Zedna Posted June 20, 2011 Share Posted June 20, 2011 (edited) Post WHOLE RELATED code: $hcombo = ...? ... local $shcombo = ControlGetHandle($title, "", $hcombo) Edited June 20, 2011 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
gigabyte Posted June 21, 2011 Author Share Posted June 21, 2011 (edited) Post WHOLE RELATED code: $hcombo = ...? ... local $shcombo = ControlGetHandle($title, "", $hcombo) #Include <GuiComboBox.au3> #Include <GuiComboBoxEX.au3> #include <GUIListBox.au3> #include <GUIConstantsEx.au3> ;~#AutoIt3Wrapper_Res_requestedExecutionLevel=requireAdministrator global $hcombo = "[NAME:ctlMsgQueueCombo]" global $hcomboclass = "[CLASS:WindowsForms10.COMBOBOX.app.0.2bf8098_r15_ad12]" global $title = "Test Form" global $index = 0 WinActivate ($title) ;Start test executable Run("Z:\test\Info.Test\bin\Debug\Info.Test.exe") sleep(6000) controlFocus("", "", "[NAME:ctlSelector]") controlsend("", "", "[NAME:ctlSelector]", 'QWER67') sleep(1000) local $shcombo = ControlGetHandle($title, "", $hcombo) local $sText = 'TYY Processor (QWERYY980) - Q00S00' $Index = _GUICtrlComboBox_FindStringExact($shcombo, $sText) _GUICtrlComboBox_SelectString($shcombo, $Index) Edited June 21, 2011 by gigabyte Link to comment Share on other sites More sharing options...
Zedna Posted June 21, 2011 Share Posted June 21, 2011 (edited) CLASS:WindowsForms10.COMBOBOX.app.0.2bf8098_r15_ad12This is not STANDARD Windows control. As far as I know it's DOTNET control. Search this forum for questions/answers about automatizing DOTNET/WindowsForms.EDIT: Autoit can work only with STANDARD controls. Edited June 21, 2011 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
gigabyte Posted June 22, 2011 Author Share Posted June 22, 2011 This is not STANDARD Windows control. As far as I know it's DOTNET control. Search this forum for questions/answers about automatizing DOTNET/WindowsForms.EDIT: Autoit can work only with STANDARD controls.At last the following code selects the desired item from list but after clicking the button it wont actually set the object ref_GUICtrlComboBox_SelectString($shcombo, "TYY Processor (QWERYY980) - Q00S00")sleep(3000)$hButton = ControlGetHandle($title, "Submit", $hButtonCtrlId)_GUICtrlButton_Click($hButton)This code makes the desired selection and then clicks the button but actually the object ref was not set to that desired item. I searched for the dot net forums but couldn't find any thing that gives me a clue. PLz guide Link to comment Share on other sites More sharing options...
Zedna Posted June 22, 2011 Share Posted June 22, 2011 I searched for the dot net forums but couldn't find any thing that gives me a clue. PLz guideSearch for WindowsForms Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
gigabyte Posted June 22, 2011 Author Share Posted June 22, 2011 Search for WindowsFormsBut My problem is it is successfully selecting the item from list as I can see but on back end it is not setting the object ref in application under test. I am unable to figure out how? As if I manually select I can see another combo box values being populated but in this case it selects the item but next combo is not updated so when It clicks the submit button ..Application says object ref not set. I also didn't get MSAA concept as I am a newbie. Please suggest. Need your help in this regard. If possible provide me some reference. I would be highly grateful. Link to comment Share on other sites More sharing options...
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