Jump to content

GPEDIT how to navigate and search Tree


Recommended Posts

 

Need some assistance not sure where to download this library #include <A3LTreeView.au3> and the code below does not seem to work  any comment is appreciated

 

#include <GUITreeView.au3>
#RequireAdmin
ShellExecute("gpedit.msc")
Local $Title= "Local Group Policy Editor"
Global $hWnd = ControlGetHandle("[Class:MMCMainFrame;Title:$title]","[ClassN:SysTreeView32; INSTANCE:1]", _
"[ClassnameNN:SysTreeView321]")
 
;WinWait($Title)
;WinActivate($Title)
;WinWaitActive($Title)
;ControlFocus($Title,"","[CLASS:SysTreeView32; INSTANCE:1]")
;send("{down  }" )
 
;$sPath = "Computer Configuration|Administrative Templates| Windows Components|Internet Explorer| Compatibility View|Use Policy List of Quirks Mode sites"
 
Global $hWnd = ControlGetHandle("[Class:MMCMainFrame;Title:$title]","[Class:SysTreeView32; INSTANCE:1]", _
"[ClassnameNN:SysTreeView321]")
 
$searchText = "Use Policy List of Quirks Mode sites"
 
$hItemFound = _GUICtrlTreeView_FindItem($hWnd, $searchText, True)
While $hItemFound
   _GUICtrlTreeView_SelectItem($hWnd, $hItemFound)
      $next = _GUICtrlTreeView_GetNextVisible($hWnd, $hItemFound)
   $hItemFound = _GUICtrlTreeView_FindItem($hWnd, $searchText, True, $next)
   Sleep(5000)
   WEnd
 
Exit

 

Edited by antonioj84
Link to comment
Share on other sites

  • Moderators

antonioj84, did you happen to notice the announcement at the top of this forum that states (clearly) This is not a general support forum!

If you're looking for assistance, I would first suggest you surround your code with code tags so it is readable. Then you could request a Mod move this thread to the proper forum, so you can get the assistance you need.

Edited by JLogan3o13

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

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