Jump to content

selecting specific tab


fr33m3
 Share

Recommended Posts

Hi,

I want to select a specific tab when I pop up system properties but I'm not sure if / how you would do this. Next, I'm going to enter device settings for hardware in windows, is there a way to select a specific branch of the tree structure in those settings?

Thanks for the help in advance,

Fr33m3

Link to comment
Share on other sites

Perhaps you would be better off using devcon.exe for this (command line device manager). I don't see how you will get far using the Device Manager.

This will open the Device Manager and select Monitors.

#Include <GuiTreeView.au3>

$title = "Device Manager"

If NOT WinExists($title) Then
    ShellExecute("devmgmt.msc")
    WinWait($title)
EndIf

WinActivate($title)

$hWnd = ControlGetHandle($title,'','[Class:SysTreeView32]')

$hwndMonitors = _GUICtrlTreeView_FindItem($hWnd, "Monitors", false)

_GUICtrlTreeView_SelectItem($hWnd, $hwndMonitors)

;_GUICtrlTreeView_SetFocused($hWnd, $hwndMonitors, true)
Link to comment
Share on other sites

  • 2 weeks later...

Perhaps you would be better off using devcon.exe for this (command line device manager). I don't see how you will get far using the Device Manager.

This will open the Device Manager and select Monitors.

#Include <GuiTreeView.au3>

$title = "Device Manager"

If NOT WinExists($title) Then
    ShellExecute("devmgmt.msc")
    WinWait($title)
EndIf

WinActivate($title)

$hWnd = ControlGetHandle($title,'','[Class:SysTreeView32]')

$hwndMonitors = _GUICtrlTreeView_FindItem($hWnd, "Monitors", false)

_GUICtrlTreeView_SelectItem($hWnd, $hwndMonitors)

;_GUICtrlTreeView_SetFocused($hWnd, $hwndMonitors, true)
Thank you for the above suggestion regarding devcon. I have been toiling with trying to install INF files for the past day, your suggestion have resolved the problem. Good thing too since I was started to code the manual process of opening up Device Manager and update the driver. :)
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...