Piyu Posted August 4, 2014 Share Posted August 4, 2014 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now