Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 15th, 2012  |  syntax: AutoIt  |  size: 1.78 KB  |  hits: 21  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #include <ButtonConstants.au3>
  2. #include <EditConstants.au3>
  3. #include <GUIConstantsEx.au3>
  4. #include <StaticConstants.au3>
  5. #include <WindowsConstants.au3>
  6. #Region ### START Koda GUI section ### Form=
  7. $Form1 = GUICreate("Generator/Odczytywator Licencji By Effx03", 615, 225, 192, 124)
  8. GUISetBkColor(0x0066CC)
  9. $Group1 = GUICtrlCreateGroup("Generator", 16, 24, 281, 145)
  10. $Input1 = GUICtrlCreateInput("Nazwa.lic", 32, 48, 145, 21)
  11. $Label1 = GUICtrlCreateLabel("Nazwa", 192, 48, 36, 17)
  12. $Input2 = GUICtrlCreateInput("Tresc", 32, 80, 145, 21)
  13. $Label2 = GUICtrlCreateLabel("GameMod...", 192, 80, 36, 17)
  14. $Button1 = GUICtrlCreateButton("Generuj Licencje !", 24, 112, 137, 33)
  15. GUICtrlCreateGroup("", -99, -99, 1, 1)
  16. $Group2 = GUICtrlCreateGroup("Odczytywacz", 312, 24, 281, 145)
  17. $Input3 = GUICtrlCreateInput("C:\", 320, 48, 145, 21)
  18. $Label3 = GUICtrlCreateLabel("Sciezka", 472, 48, 36, 17)
  19. $Button2 = GUICtrlCreateButton("Odczytaj !", 320, 96, 145, 49)
  20. GUICtrlCreateGroup("", -99, -99, 1, 1)
  21. ;$Group3 = GUICtrlCreateGroup("Odczytany Kod", 8, 176, 593, 105)
  22. ;$Edit1 = GUICtrlCreateEdit("", 24, 192, 561, 81)
  23. ;GUICtrlSetData(-1, "Edit1")
  24. ;GUICtrlCreateGroup("", -99, -99, 1, 1)
  25. GUISetState(@SW_SHOW)
  26. #EndRegion ### END Koda GUI section ###
  27.  
  28. While 1
  29.         $nMsg = GUIGetMsg()
  30.         Switch $nMsg
  31.                 Case $GUI_EVENT_CLOSE
  32.                         Exit
  33.                 Case $Button1
  34.                         $nazwa = GUICtrlRead($Input1)
  35.                         $tresc = GUICtrlRead($Input2)
  36.                         $x = FileOpen($nazwa & ".lic",1)
  37.                         FileWrite($nazwa & ".lic",$tresc)
  38.                         FileClose($nazwa)
  39.                         MsgBox(0,"Wygenerowano !","Plik: " & $nazwa & " Został Wygenerowany Pomyslnie !" )
  40.                 Case $Button2
  41.                         $czytaj = FileOpenDialog("Wybieranie Pliku...", "C:\", "Wszystkie Typy (*.lic*)", 1 + 6 )
  42.                         $plik = GUICtrlRead($Input3)
  43.                         MsgBox(0,"Odczytywanie...", FileRead($czytaj,200))
  44.  
  45.  
  46.         EndSwitch
  47. WEnd