Jump to content

Get all children of _GUICtrlTreeView item


 Share

Recommended Posts

I need to automate a driver installation for some PCI cards. But I do not know if it is 1,2,3 or 4 cards in same PC.

The device manager will look like this:

Root
 |--Unknown Devices
    |---PCI card
    |---PCI card

Again, the number of "PCI card" is unknown but may be 1 to 4.

I have investigated into the _GUICtrlTreeView_ commands, but I can not find a command to "grab" all children of a node, f.ex the node "Unknown Devices" so that f.ex an array would have

[PCI card][PCI card]...

(obviously the memory reference, not the text!, so I can later set focus on them one by one...)

GetNextChild / GetFirstChild does not really help me, as f.ex GetNextChild does not seem to fail after last childnode.

Other ways to do the job ? Can the device manager be scripted from DOS / PowerShell ?

Machine is a Windows7.

Thanks for any help!

I am just a hobby programmer, and nothing great to publish right now.

Link to comment
Share on other sites

You don't need anything to fail, just get the count of children with _GUICtrlTreeView_GetChildCount() and control your loop with that count.

:unsure:

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
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...