Hi
First off, Thanks for all your hard work!
I too have received the dreaded cannot redeclare constant error even though I'm using the latest AI version
3.2.4.9 and your code downloaded yesterday.
Here is what I'm trying to do
Run("mmc.exe")
If WinWaitActive("Console1", "", 60) Then
Send("!fo")
Send ($systemRoot & "\system32\compmgmt.msc")
Send("{ENTER}")
EndIf
WinWaitActive("Computer Management", "", 60)
#include <A3LMenu.au3>
#include <A3LListView.au3>
#include <A3LToolbar.au3>
#include <A3LTreeView.au3>
Opt("MustDeclareVars", 1)
Global $hTree, $hNode, $hList, $text, $iI, $sItem, $aRect
$hTree = ControlGetHandle("Computer Management", "", "SysTreeView321")
if @Error then _Lib_ShowError("Unable to find TreeView window")
$hNode = _TreeView_FindNode($hTree, "Local Users and Groups")
if $hNode = 0 then _Lib_ShowError('Unable to find "Local Users and Groups')
_TreeView_Click($hTree, $hNode)
_TreeView_Expand($hTree, $hNode)
$hNode = _TreeView_FindNode($hTree, "Groups")
_TreeView_Click($hTree, $hNode)
$hList = ControlGetHandle("Computer Management", "", "SysListView321")
if $hList = 0 then _Lib_ShowError("Unable to obtain ListView handle in ClickItem")
for $iI = 0 to _ListView_GetItemCount($hList) - 1
MsgBox(0, "text ..................: " & _ListView_GetItemText($hList, $iI))
next
I'm not sure I'm using the lib right but I was under the impression that I needed to use the TreeVew lib to get to the right node and the ListView lib to display the contents.
Again,
Thanks for some great code.