#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Generator/Odczytywator Licencji By Effx03", 615, 225, 192, 124)
GUISetBkColor(0x0066CC)
$Group1 = GUICtrlCreateGroup("Generator", 16, 24, 281, 145)
$Input1 = GUICtrlCreateInput("Nazwa.lic", 32, 48, 145, 21)
$Label1 = GUICtrlCreateLabel("Nazwa", 192, 48, 36, 17)
$Input2 = GUICtrlCreateInput("Tresc", 32, 80, 145, 21)
$Label2 = GUICtrlCreateLabel("GameMod...", 192, 80, 36, 17)
$Button1 = GUICtrlCreateButton("Generuj Licencje !", 24, 112, 137, 33)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group2 = GUICtrlCreateGroup("Odczytywacz", 312, 24, 281, 145)
$Input3 = GUICtrlCreateInput("C:\", 320, 48, 145, 21)
$Label3 = GUICtrlCreateLabel("Sciezka", 472, 48, 36, 17)
$Button2 = GUICtrlCreateButton("Odczytaj !", 320, 96, 145, 49)
GUICtrlCreateGroup("", -99, -99, 1, 1)
;$Group3 = GUICtrlCreateGroup("Odczytany Kod", 8, 176, 593, 105)
;$Edit1 = GUICtrlCreateEdit("", 24, 192, 561, 81)
;GUICtrlSetData(-1, "Edit1")
;GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$nazwa = GUICtrlRead($Input1)
$tresc = GUICtrlRead($Input2)
$x = FileOpen($nazwa & ".lic",1)
FileWrite($nazwa & ".lic",$tresc)
FileClose($nazwa)
MsgBox(0,"Wygenerowano !","Plik: " & $nazwa & " Został Wygenerowany Pomyslnie !" )
Case $Button2
$czytaj = FileOpenDialog("Wybieranie Pliku...", "C:\", "Wszystkie Typy (*.lic*)", 1 + 6 )
$plik = GUICtrlRead($Input3)
MsgBox(0,"Odczytywanie...", FileRead($czytaj,200))
EndSwitch
WEnd