Jump to content

When AutoIT script is selecting Combobox item. Combobox_SelectedIndexChanged Event is not triggering in Windows 10 OS. - (Moved)


Recommended Posts

Posted

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.

  • Moderators
Posted (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 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!

Posted

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, "","")

 

Posted

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?

Posted

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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...