electros Posted January 27, 2009 Posted January 27, 2009 How do to introduce the name of the programs for ini file sections [Title] in Treeview window. P.S. I would like to appear if it is written: Adobe = 1 and if is written Adobe = 0 do not appear Autorun1.au3 This is ini file CODE[Programs] C:\Program Files\Dr.Batcher\Dr_Batch.exe=0 C:\Program Files\(E)lephant\(E)lephant.exe=1 [settings] AutoStart=1 [Title] (E)lephant=1 Blaunch=1 Adobe=1 Thanks
Aceguy Posted January 27, 2009 Posted January 27, 2009 (edited) your inifile does not look like a standard inifile... see the helpfile you inifile would be better like this [Programs] 0=C:\Program Files\Dr.Batcher\Dr_Batch.exe|0 1-C:\Program Files\(E)lephant\(E)lephant.exe|1 [Settings] 0=AutoStart|1 [Title] 0=(E)lephant|1 1=Blaunch|1 2=Adobe|1 just to help you get started expandcollapse popup#include <GUIConstantsEx.au3> #include <ProgressConstants.au3> #include <TreeViewConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 311, 564, 357, 138, BitOR($WS_SYSMENU,$WS_CAPTION,$WS_POPUP,$WS_POPUPWINDOW,$WS_BORDER,$WS_CLIPSIBLINGS)) $Progress1 = GUICtrlCreateProgress(8, 32, 289, 17) $TreeView1 = GUICtrlCreateTreeView(16, 56, 169, 489) ;$TreeView1_0 = GUICtrlCreateTreeViewItem("", $TreeView1) ;$TreeView1_1 = GUICtrlCreateTreeViewItem("", $TreeView1) ;$TreeView1_2 = GUICtrlCreateTreeViewItem("", $TreeView1) $TreeView2 = GUICtrlCreateTreeView(185, 56, 111, 489) ;$TreeView2_0 = GUICtrlCreateTreeViewItem("", $TreeView2) ;$TreeView2_1 = GUICtrlCreateTreeViewItem("", $TreeView2) ;$TreeView2_2 = GUICtrlCreateTreeViewItem("", $TreeView2) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### $ProgramArray = IniReadSection(@DesktopDir & "\config.ini","Title") ConsoleWrite(@error&" Eerror"&@lf) If Not @error Then For $i = 1 To $ProgramArray[0][0] $ss=StringSplit($ProgramArray[$i][1],"|") if $ss[2]=1 Then $treeitem = GUICtrlCreateTreeViewItem($ss[1],$TreeView1) ;GUICtrlSetState(-1, $GUI_HIDE) ;If $ProgramArray[$i][1] = "1" Then ;GUICtrlSetState($tree,$GUI_CHECKED) EndIf Next EndIf While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Form1 Case $Form1 Case $Form1 Case $Form1 Case $TreeView1 Case $TreeView2 EndSwitch WEnd Not fixed your other probmes. NOTE changed your path to @desktopdir....... NOTE Edited January 27, 2009 by Aceguy [u]My Projects.[/u]Launcher - not just for games & Apps (Mp3's & Network Files)Mp3 File RenamerMy File Backup UtilityFFXI - Realtime to Vana time Clock
electros Posted January 27, 2009 Author Posted January 27, 2009 your inifile does not look like a standard inifile...see the helpfileyou inifile would be better like this[Programs] 0=C:\Program Files\Dr.Batcher\Dr_Batch.exe|0 1-C:\Program Files\(E)lephant\(E)lephant.exe|1 [Settings] 0=AutoStart|1 [Title] 0=(E)lephant|1 1=Blaunch|1 2=Adobe|1just to help you get startedexpandcollapse popup#include <GUIConstantsEx.au3> #include <ProgressConstants.au3> #include <TreeViewConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 311, 564, 357, 138, BitOR($WS_SYSMENU,$WS_CAPTION,$WS_POPUP,$WS_POPUPWINDOW,$WS_BORDER,$WS_CLIPSIBLINGS)) $Progress1 = GUICtrlCreateProgress(8, 32, 289, 17) $TreeView1 = GUICtrlCreateTreeView(16, 56, 169, 489) ;$TreeView1_0 = GUICtrlCreateTreeViewItem("", $TreeView1) ;$TreeView1_1 = GUICtrlCreateTreeViewItem("", $TreeView1) ;$TreeView1_2 = GUICtrlCreateTreeViewItem("", $TreeView1) $TreeView2 = GUICtrlCreateTreeView(185, 56, 111, 489) ;$TreeView2_0 = GUICtrlCreateTreeViewItem("", $TreeView2) ;$TreeView2_1 = GUICtrlCreateTreeViewItem("", $TreeView2) ;$TreeView2_2 = GUICtrlCreateTreeViewItem("", $TreeView2) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### $ProgramArray = IniReadSection(@DesktopDir & "\config.ini","Title") ConsoleWrite(@error&" Eerror"&@lf) If Not @error Then For $i = 1 To $ProgramArray[0][0] $ss=StringSplit($ProgramArray[$i][1],"|") if $ss[2]=1 Then $treeitem = GUICtrlCreateTreeViewItem($ss[1],$TreeView1) ;GUICtrlSetState(-1, $GUI_HIDE) ;If $ProgramArray[$i][1] = "1" Then ;GUICtrlSetState($tree,$GUI_CHECKED) EndIf Next EndIf While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Form1 Case $Form1 Case $Form1 Case $Form1 Case $TreeView1 Case $TreeView2 EndSwitch WEndNot fixed your other probmes.NOTE changed your path to @desktopdir....... NOTEThanks i test it and works. I hope that if i got any questions you help me again Thanks again
electros Posted January 27, 2009 Author Posted January 27, 2009 I tried to set the background treeview window transparent with "GuiCtrlSetBkColor($TreeView1,$GUI_BKCOLOR_TRANSPARENT)" but now the background is black. Why?
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