Hello guys, I have a question if you can help.
I made a code and I have a little problem, when I press button2, not create listview at my right name. How can I save dynamic variables?
Thanks !
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <TreeViewConstants.au3>
#include <WindowsConstants.au3>
#NoTrayIcon
$Combo1_1 = ""
#region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 465, 301, 396, 247)
$Input1 = GUICtrlCreateInput("", 28, 8, 121, 21)
$Button1 = GUICtrlCreateButton("add name", 34, 30, 75, 25)
$Combo1 = GUICtrlCreateCombo("", 24, 130, 137, 25, BitOR($CBS_DROPDOWNLIST, $CBS_AUTOHSCROLL))
$Button2 = GUICtrlCreateButton("add text to name", 33, 64, 107, 25)
$Input2 = GUICtrlCreateInput("", 28, 100, 121, 21)
$TreeView1 = GUICtrlCreateTreeView(168, 4, 289, 289)
GUISetState(@SW_SHOW)
#endregion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$Combo1_1 = $Combo1_1 & GUICtrlRead($Input1) & ";"
$Split1 = StringSplit($Combo1_1, ";")
If IsArray($Split1) Then
For $q = 1 To UBound($Split1) - 2
GUICtrlSetData($Combo1, $Split1[$q], $Split1[$q])
Next
$TreeView1_23 = GUICtrlCreateTreeViewItem(GUICtrlRead($Input1), $TreeView1)
EndIf
Case $Button2
$TreeView1_24 = GUICtrlCreateTreeViewItem(GUICtrlRead($Input2), $TreeView1_23)
EndSwitch
WEnd