YoungRacoon Posted February 18, 2008 Share Posted February 18, 2008 Hi! Can anyone help me with ControlTreeView? All I want is to position on "System Tools -> Local Users and Groups" in compmgmt.msc (Computer Management). Here is my code: run ("cmd /c compmgmt.msc", @SystemDir, @SW_HIDE) WinWaitActive("Computer Management") ControlTreeView ("Computer Management", "Computer Management (Local)", 12785, "Select", "Heading2|H1SubItem1") Computer Management snapin opens successfully but after that nothing happens. The upper node Computer Management (Local) remains selected. What's wrong with my code? How to select "System Tools -> Local Users and Groups"? Thanks in advance, Yuri. Link to comment Share on other sites More sharing options...
Zedna Posted February 18, 2008 Share Posted February 18, 2008 ControlTreeView ("Computer Management", "", 12785, "Select", ""Computer Management (Local)|System Tools|Local Users and Groups"") Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
YoungRacoon Posted February 19, 2008 Author Share Posted February 19, 2008 ControlTreeView ("Computer Management", "", 12785, "Select", ""Computer Management (Local)|System Tools|Local Users and Groups"") Thank you, Zedna. Actually, it's not working. Any suggestions? --------------------------- AutoIt Error --------------------------- Line 5 (File "compmgmt.au3"): ControlTreeView ("Computer Management", "", 12785, "Select", ""Computer Management (Local)|System Tools|Local Users and Groups"") ControlTreeView ("Computer Management", "", 12785, "Select", ""Computer Management (Local)^ ERROR Error: Unable to parse line. --------------------------- OK --------------------------- Link to comment Share on other sites More sharing options...
YoungRacoon Posted February 19, 2008 Author Share Posted February 19, 2008 ControlTreeView ("Computer Management", "", 12785, "Select", ""Computer Management (Local)|System Tools|Local Users and Groups"") Yes, I got it. The final variant is ControlTreeView ("Computer Management", "", 12785, "Select", "Computer Management (Local)|System Tools|Local Users and Groups") There were accidental quotes in your example. But you pushed me in the right direction. Thank you very much, Zedna! I really appreciated your help! Link to comment Share on other sites More sharing options...
yucatan Posted April 14, 2008 Share Posted April 14, 2008 hi can somebody help me out i allmust want teh same but now not the local users and groups but the device manager and then expend the network divices can somebody help me with this,, Run(@ComSpec & " /c " & 'devmgmt.msc', "", @SW_HIDE) winwait("Apparaatbeheer") ControlTreeView("Apparaatbeheer", "", "", "Expand", "Netwerkadapters") If @error = 1 Then MsgBox(1, "", "Error") Link to comment Share on other sites More sharing options...
Triblade Posted April 14, 2008 Share Posted April 14, 2008 hi can somebody help me out i allmust want teh same but now not the local users and groups but the device manager and then expend the network divices can somebody help me with this,,You have another Topic on this, read my awnser in there... My active project(s): A-maze-ing generator (generates a maze) My archived project(s): Pong3 (Multi-pinger) Link to comment Share on other sites More sharing options...
yucatan Posted April 14, 2008 Share Posted April 14, 2008 (edited) can somebody tell me why this dont work this code fits the devicemanager and then its selecting the networking devices but with the 2th controltreeview command it should select the first network device that below netwerkadapters.. but the problem is that dont work.... #RequireAdmin Run(@ComSpec & " /c " & 'devmgmt.msc', "", @SW_HIDE) winwait("Apparaatbeheer") Sleep(1500) ControlTreeView("Apparaatbeheer", "", "[Class:SysTreeView32; Instance:1]", "Expand", @ComputerName & "|Netwerkadapters") Sleep(500) ControlTreeView("Apparaatbeheer", "", "[Class:SysTreeView32; Instance:1]", "Select", @ComputerName & "|Netwerkadapters|#1") Send("{ENTER}") Edited April 14, 2008 by yucatan 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