I'm using AutoitX 3.3.8.1 with vb.net
Just trying to automate selecting a newvalue in a combobox which is in a dialog of an external application.
I know the dlghwnd, the combohwnd, and also the ctrl id of the combo in the dialog.
No problem.
text of combo is empty according to AUtoIt window info tool
This tool reports also [CLASS:ComboBox; INSTANCE:4] or ComboBox4
When the comboctrlid is not 0, the following works well.
dim ai As New AutoItX3Lib.AutoItX3
ai.AutoItSetOption("WinTitleMatchMode", 3)
res = ai.ControlCommand("[HANDLE: "+dlghwnd.ToString()+"]", "", "[ID:" + comboctrlid.ToString() + "]", "SelectString", newvalue)
res is "0", but the combo is changed
However if the comboctrlid is 0, or if I want to try a different method
res = ai.ControlCommand("[HANDLE: "+dlghwnd.ToString()+"]", "", "ComboBox4", "SelectString", newvalue)
res = ai.ControlCommand("[HANDLE: "+dlghwnd.ToString()+"]", "", "[CLASS:ComboBox; INSTANCE:4]", "SelectString", newvalue)
are not working,
res is "0", the combo is not changed.
but this will work
res = ai.ControlCommand(dialogtitle, "", "ComboBox4", "SelectString", newvalue)
res = ai.ControlCommand(dialogtitle, "", "[CLASS:ComboBox; INSTANCE:4]", "SelectString", newvalue)
res is "0", the combo is changed.
It seems that the Advanced Windows Text options such as LAST, ACTIVE, HANDLE will not work in the first Title parameter when used with 3rd parameter CLASSNAMENN instead of CTRLID
Is this a bug, or a feature ?
Or am I missing something ?
Just trying to automate selecting a newvalue in a combobox which is in a dialog of an external application.
I know the dlghwnd, the combohwnd, and also the ctrl id of the combo in the dialog.
No problem.
text of combo is empty according to AUtoIt window info tool
This tool reports also [CLASS:ComboBox; INSTANCE:4] or ComboBox4
When the comboctrlid is not 0, the following works well.
dim ai As New AutoItX3Lib.AutoItX3
ai.AutoItSetOption("WinTitleMatchMode", 3)
res = ai.ControlCommand("[HANDLE: "+dlghwnd.ToString()+"]", "", "[ID:" + comboctrlid.ToString() + "]", "SelectString", newvalue)
res is "0", but the combo is changed
However if the comboctrlid is 0, or if I want to try a different method
res = ai.ControlCommand("[HANDLE: "+dlghwnd.ToString()+"]", "", "ComboBox4", "SelectString", newvalue)
res = ai.ControlCommand("[HANDLE: "+dlghwnd.ToString()+"]", "", "[CLASS:ComboBox; INSTANCE:4]", "SelectString", newvalue)
are not working,
res is "0", the combo is not changed.
but this will work
res = ai.ControlCommand(dialogtitle, "", "ComboBox4", "SelectString", newvalue)
res = ai.ControlCommand(dialogtitle, "", "[CLASS:ComboBox; INSTANCE:4]", "SelectString", newvalue)
res is "0", the combo is changed.
It seems that the Advanced Windows Text options such as LAST, ACTIVE, HANDLE will not work in the first Title parameter when used with 3rd parameter CLASSNAMENN instead of CTRLID
Is this a bug, or a feature ?
Or am I missing something ?