Jump to content

how to use _GUICtrlTreeView_FindItem and _GUICtrlTreeView_ClickItem using C#


Piyu
 Share

Recommended Posts

Hi,

I am using Autoit in C#, by adding "using AutoItX3Lib" reference and following below code I can open my application

AutoItX3Lib.AutoItX3 autoitcode= new AutoItX3Lib.AutoItX3();
autoit.Run(@"C:\MyApplication.exe", "", autoitcode.SW_SHOW);

Now I don't know how to use  _GUICtrlTreeView_FindItem and _GUICtrlTreeView_ClickItem  functions using C#.

Referring to link                    

?do=embed' frameborder='0' data-embedContent>

 I tried below code but it's not working. I get blank value in hItemFound

Could you please suggest solution. Thank you!

autoitcode.Run(@"C:Myapplication.exe", "", autoitcode.SW_SHOW);
            dynamic myAu3Object = Marshal.BindToMoniker("AutoIt.Application");

            string autohandle=autoitcode.ControlGetHandle("[CLASS:WindowsForms10.Window.8.app.0.3e799b_r11_ad1;TITLE:MyApplication]", "", "[NAME:tvnMyApplictaion]");
            string searchstring = "MySettings";

            string hItemFound=myAu3Object.Call("_GUICtrlTreeView_FindItem",autohandle,searchstring,true);

            myAu3Object.Call("_GUICtrlTreeView_ClickItem", autohandle,hItemFound);

 

 

Link to comment
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
 Share

  • Recently Browsing   0 members

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