YoungRacoon Posted May 9, 2008 Share Posted May 9, 2008 (edited) Hi. Jon was so kind to implement ControlTreeView in the AutoItX 3.2.11.12 beta (http://svn.autoitscript.com/trac/ticket/244). I tried to make it work but bumped into the following:It works (AutoIt):run ('cmd /c "compmgmt.msc"', "c:\windows\system32\") WinWaitActive("Computer Management") ControlTreeView ("Computer Management", "", 12785, "Select", "Computer Management (Local)|System Tools")It doesn't work (jscript & AutoItX):var oAutoIt = WScript.CreateObject("AutoItX3.Control") oAutoIt.Run('cmd /c "compmgmt.msc"', "c:\\windows\\system32\\") oAutoIt.WinWaitActive("Computer Management") oAutoIt.ControlTreeView ("Computer Management", "", 12785, "Select", "Computer Management (Local)|System Tools")Computer Management mmc is opened successfully but while trying to select an item I get the following error:---------------------------Windows Script Host---------------------------Script: E:\Expo\test.jsLine: 4Char: 1Error: Wrong number of arguments or invalid property assignmentCode: 800A01C2Source: Microsoft JScript runtime errorCould you please tell me what's wrong with this piece of code? What should I take into account?Thanks in advance, Yuri. Edited May 9, 2008 by YoungRacoon Link to comment Share on other sites More sharing options...
Administrators Jon Posted May 9, 2008 Administrators Share Posted May 9, 2008 I'll check it out. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
Administrators Jon Posted May 9, 2008 Administrators Share Posted May 9, 2008 add a blank parameter on the end: oAutoIt.ControlTreeView ("Computer Management", "", 12785, "Select", "Computer Management (Local)|System Tools", "") Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
YoungRacoon Posted May 9, 2008 Author Share Posted May 9, 2008 add a blank parameter on the end:oAutoIt.ControlTreeView ("Computer Management", "", 12785, "Select", "Computer Management (Local)|System Tools", "")Jon, it works! Thanks! 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