Jump to content

Recommended Posts

Posted (edited)

ControlCommand ( $hWndAccount, "", "[CLASS:WindowsForms10.COMBOBOX.app.0.378734a; Instance:6]", "SelectString", 'IKEv2')

I am able to properly drop down the menu in the code above. However I can't select the option. I know IKEv2 is a correct string. The value being returned by ControlCommand = 0 which means no error (error = 1).

Does anyone have any insight on this problem?

Thanks!

Edit:

To add to this, Window Info shows text = " " (blank). Could this mean that the items in this combobox cannot be accessed via conventional ControlCommand?

Edited by ChiGGz
Posted

The value being returned by ControlCommand = 0 which means no error (error = 1).

Not sure if you understand the return value of ControlCommand and the setting of the @error macro so I will explain some.

Sets selection according to string in a ListBox or ComboBox

Nothing is mentioned of a return value. If the function fails then the @error macro will be set to a value of 1.

Your description to checking error does seem vague to the above to be sure of understanding.

As the return value is irrelevent to check, then checking the @error macro is about all you can do to acknowledge function failure.

Example @error checking:

ControlCommand ( $hWndAccount, "", "[CLASS:WindowsForms10.COMBOBOX.app.0.378734a; Instance:6]", "SelectString", 'IKEv2')
If @error Then
    MsgBox(0x40000, '', 'ControlCommand function failed')
EndIf

The class name does look some what like a .Net program or other so could be a differcult one, if not impossible but only one way to find out (as I can only guess with the info supplied).

:D

Posted (edited)

Hi MHz,

Thank-you for your explanation. I captured @error and it is indeed returning failure. :D

Unfortunately I do not know what IDE this was coded in.

So now I'm manually scrolling via

ControlCommand ( $hWndAccount, "", "[CLASSNN:WindowsForms10.COMBOBOX.app.0.378734a6]", "ShowDropDown", "")
    ControlSend ( $hWndAccount, "", "[CLASSNN:WindowsForms10.COMBOBOX.app.0.378734a6]", "{DOWN}")

Does anyone have an alternative for me to select an item within a combobox that doesnt require X,Y mouse movement or controlSend?

Edited by ChiGGz

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
×
×
  • Create New...