YoungRacoon Posted May 9, 2008 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
Administrators Jon Posted May 9, 2008 Administrators Posted May 9, 2008 add a blank parameter on the end: oAutoIt.ControlTreeView ("Computer Management", "", 12785, "Select", "Computer Management (Local)|System Tools", "")
YoungRacoon Posted May 9, 2008 Author 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!
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