Senthilraja Posted October 4, 2018 Posted October 4, 2018 When AutoIT script is selecting Combobox item. Combobox_SelectedIndexChanged Event is not triggering in Windows 10 OS. But the same script is working fine in Windows 7 OS. Please let us know how to solve this problem.
Danp2 Posted October 4, 2018 Posted October 4, 2018 @Senthilraja Welcome to the forum! First step would be to post your script (or a small reproducer) so that we can better understand your issue. Regards, Dan P.S. See here for how to properly post code in the forum Latest Webdriver UDF Release Webdriver Wiki FAQs
Moderators JLogan3o13 Posted October 4, 2018 Moderators Posted October 4, 2018 (edited) Moved to the appropriate forum, as the Developer General Discussion forum very clearly states: Quote General development and scripting discussions. If it's super geeky and you don't know where to put it - it's probably here. Do not create AutoIt-related topics here, use the AutoIt General Help and Support or AutoIt Technical Discussion forums. Moderation Team Edited October 4, 2018 by JLogan3o13 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
Senthilraja Posted October 5, 2018 Author Posted October 5, 2018 Thanks Danp, Following is the code. First we need to select the customer and based on customer the Orders will be populated in Orders Combo box and it order has to be selected and uploaded it Database. The issue here is, After customer is selected the Order combo box is not getting populated. (Issue is on Windows 10 OS. But the same code works for Windows 7 OS) Reason - Combox_SelectedIndexChanged Event is not getting triggered in the application code. One more observation: - If I add msgbox before second ControlClick($ID,"","") then above event is getting triggered and its working fine. But i don't want have any msgbox in the workflow. please suggest how to proceed. ;Customer combo box selection $ID=controlgethandle($handle,"","[NAME:comboCustomer]") ControlClick ( $ID, "","") $index=_GUICtrlComboBox_FindStringExact($ID,$p[6][$c]) dly($ts) $a=_GUICtrlComboBox_SetCurSel( $ID, $index) dly($ts) ControlClick ( $ID, "","") ;Order Combo box Selection $ID=controlgethandle($handle,"","[NAME:comboOrder]") ControlClick ( $ID, "","") $index=_GUICtrlComboBox_FindStringExact($ID,$p[7][$c]) dly($ts) $a=_GUICtrlComboBox_SetCurSel( $ID, $index) dly($ts) ControlClick ( $ID, "","")
Danp2 Posted October 5, 2018 Posted October 5, 2018 I assume the ControlClick is to cause the combobox to show / hide the listbox. Have you tried using _GUICtrlComboBox_ShowDropDown instead. You could also try using _GUICtrlComboBox_SelectString instead of the combination of _GUICtrlComboBox_FindStringExact / GUICtrlComboBox_SetCurSel. 6 hours ago, Senthilraja said: If I add msgbox before second ControlClick($ID,"","") then above event is getting triggered and its working fine. This makes it sound like a focus issue. Have you tried using ControlFocus to switch the input focus to a different control? Latest Webdriver UDF Release Webdriver Wiki FAQs
Senthilraja Posted October 8, 2018 Author Posted October 8, 2018 Thanks Danp, I have tried ControlFocus but no luck. Below statement worked.. " _GUICtrlComboBox_ShowDropDown" solved the issue. On 10/5/2018 at 4:58 PM, Danp2 said: I assume the ControlClick is to cause the combobox to show / hide the listbox. Have you tried using _GUICtrlComboBox_ShowDropDown instead Thanks Danp for your support.
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