bab Posted October 26, 2010 Share Posted October 26, 2010 I am trying (stress trying) to create a server documentation app using treeview. So far the menu looks like: +Servers -filesrv01 -htmdoc1 -htmldoc2 -dhtmloc3 -filesrv02 -htmldoc1 -htmldoc2 -htmldoc3 -filesrv03 -htmldoc1 -htmldoc2 -htmldoc3 My question: How do I write the code to showing that I selected for example filesrv03, doc3 and show that doc in a window using explorer. Thanks for your help. My code so far: #include <GuiConstantsEx.au3> #include <GuiTreeView.au3> #include <GuiTab.au3> #include <Array.au3> Global $hGUI, $hTreeView, $hTemp, $docs, $idButton Dim $srvlst Local $aArray[5] = ["Backup", "Baseline", "ChangeControl", "ComplianceCheck", "Configuration"]; subitems, documents for each server Local $j $hGUI = GUICreate("Server Compliance Reports", 1696, 1000) $hTreeView = _GUICtrlTreeView_Create($hGUI, 30, 30, 200, 880) $hTemp = _GUICtrlTreeView_Add($hTreeView, 0, "Server Compliance Reports") $hTemp = _GUICtrlTreeView_AddChild($hTreeView, $hTemp, "Servers") $srvlst = IniReadSection("servers.ini", "Servers") For $i = 1 To $srvlst[0][0] Step +1 $docs = _GUICtrlTreeView_AddChild($hTreeView, $hTemp, $srvlst[$i][1]) For $j = 0 to 5 - 1 _GUICtrlTreeView_AddChild($hTreeView, $docs, $aArray[$j]) Next Next $idButton = GUICtrlCreateButton("Close", 280, 120) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $idButton Exit EndSwitch WEnd Link to comment Share on other sites More sharing options...
PsaltyDS Posted October 26, 2010 Share Posted October 26, 2010 Here is a working example that registers WM_NOTIFY to detect an item being clicked in a TreeView and then displaying which item. 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now