Jump to content
Sign in to follow this  

Get all children of _GUICtrlTreeView item

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:

 |--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.

Share this post

Link to post
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.


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

Share this post

Link to post
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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...