#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <LangUDF.au3>


;~ _ArrayDisplay($Array,'Array')

Global $Button[7] = ['1','2','3','4','5','6','7']
Global $ButtonLeft[8] = [20,80,140,20,80,140,20,80]
Global $ButtonTop[8] = [20,20,20,50,50,50,80,20]

#Region ### START Koda GUI section ### Form=
;~ $hGui = GUICreate('Test', 240, 130, -1, -1)
;~ GUICtrlCreateGroup('', 10, 5, 220, 110)
;~ $Button7 = GUICtrlCreateButton($Array[0], 20, 20, -1, -1)
;~ $Button2 = GUICtrlCreateButton($Array[1], 80, 50, -1, -1)
;~ $Button3 = GUICtrlCreateButton($Array[2], 20, 50, -1, -1)
;~ $Button1 = GUICtrlCreateButton($Array[3], 140, 50, -1, -1)
;~ $Button4 = GUICtrlCreateButton($Array[4], 20, 80, -1, -1)
;~ $Button5 = GUICtrlCreateButton($Array[5], 80, 80, -1, -1)
;~ $Button6 = GUICtrlCreateButton($Array[6], 140, 80, -1, -1)

$hGui2 = GUICreate('Test2', 240, 130, -1, -1)
GUICtrlCreateGroup('', 10, 5, 220, 110)
For $i = 0 To UBound($Button) -1
	GUICtrlCreateButton($Array[$i],$ButtonLeft[$i],$ButtonTop[$i],-1,-1)
Next

GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
	$nMsg = GUIGetMsg()
	Switch $nMsg
		Case $GUI_EVENT_CLOSE
			Exit

	EndSwitch
WEnd
