Jump to content
Sign in to follow this  
tomfox

Is Visual Studio Combobox and Checkbutton not supported ?

Recommended Posts

tomfox

Hi all,

I'm trying to remote control an application written in visual studio with the original visual studio toolbox but some controls don't seem to work

I've learned that Autoit supports only "standard Microsoft controls"

so my question is:

CLASS:WindowsForms10.COMBOBOX.app.0.2bf8098_r13_ad1 and CLASS:WindowsForms10.BUTTON.app.0.2bf8098_r13_ad1 (this is a checkbox control)

are 'non standard' controls although they come from Microsoft ?

Or am I doing something wrong here ?

See my test results at the end of each coding line

string test = autoit.ControlCommand("[TITLE:Form100]", "", "[CLASS:WindowsForms10.BUTTON.app.0.2bf8098_r13_ad1; INSTANCE:1]", "Check", ""); //<-- working but returning 0
            test = autoit.ControlCommand("[TITLE:Form100]", "", "[CLASS:WindowsForms10.BUTTON.app.0.2bf8098_r13_ad1; INSTANCE:1]", "UnCheck", ""); //<-- not working returning 0
            test = autoit.ControlCommand("[TITLE:Form100]", "", "[CLASS:WindowsForms10.BUTTON.app.0.2bf8098_r13_ad1; INSTANCE:1]", "IsChecked", ""); //<-- not working returning 0
           
            
            test = autoit.ControlCommand("[TITLE:Form100]", "", "[CLASS:WindowsForms10.COMBOBOX.app.0.2bf8098_r13_ad1; INSTANCE:4]", "ShowDropDown", ""); //<-- working but returning 0
            test = autoit.ControlCommand("[TITLE:Form100]", "", "[CLASS:WindowsForms10.COMBOBOX.app.0.2bf8098_r13_ad1; INSTANCE:4]", "HideDropDown", ""); //<-- working but returning 0
            test = autoit.ControlCommand("[TITLE:Form100]", "", "[CLASS:WindowsForms10.COMBOBOX.app.0.2bf8098_r13_ad1; INSTANCE:4]", "FindString", "time[s]"); //<-- not working returning 0
            test = autoit.ControlCommand("[TITLE:Form100]", "", "[CLASS:WindowsForms10.COMBOBOX.app.0.2bf8098_r13_ad1; INSTANCE:4]", "SelectString", "Distance[m]"); //<-- not working returning 0
            test = autoit.ControlCommand("[TITLE:Form100]", "", "[CLASS:WindowsForms10.COMBOBOX.app.0.2bf8098_r13_ad1; INSTANCE:4]", "GetCurrentSelection", ""); //<-- not working returning 0
            int itest = autoit.ControlSetText("[TITLE:Form100]", "", "[CLASS:WindowsForms10.COMBOBOX.app.0.2bf8098_r13_ad1; INSTANCE:4]", "mytext"); //<-- working returning 1

 

Share this post


Link to post
Share on other sites
tomfox

ok, let me rephrase my question.

I am using Autoit in a .net application.

Why is 'ControlCommand' not working with comboboxes and checkbuttons ?

Why this example not working ?

autoit.ControlCommand("[TITLE:Form100]", "", "[CLASS:WindowsForms10.COMBOBOX.app.0.2bf8098_r13_ad1; INSTANCE:4]", "SelectString", Distance[m]");

is there a workaround ?

Share this post


Link to post
Share on other sites
junkew

ok, let me rephrase my answer
 quick start: /?do=embed' frameborder='0' data-embedContent>>/?do=embed' frameborder='0' data-embedContent>

Main thread: '?do=embed' frameborder='0' data-embedContent>>

If the spy does not get text / information UIA will not be the right technology to get your information

  • screenshot that shows your element is highlighted with simplespy
  • post output of simplespy with all properties
  • attached log.txt if available in your script directory
  • use allways contents of latest zip files which could be work in progress (WIP) zip

Share this post


Link to post
Share on other sites
tomfox

thanks for helping,

instead of simplespy I tried "(Frozen) Autoitv3 Window Info" to find the control, but still didn't get access.

So I ended up using a different tool "Teststack White" which is perfect for my .net environment.

Just want to let you know if soemone else is having a similar problem.

Tom

Share this post


Link to post
Share on other sites
junkew

White provides a consistent object-oriented API, hiding the complexity of Microsoft's UIAutomation library (on which White is based) and windows messages.

so the library/udf UIAWrappers.au3 I wrote has the same underlying stuff as White has its only written in AutoIT and supports what tomfox asked for. Just to be complete for people looking an AutoIT solution.

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×