MrTheDzam

From 1 to 999999

Dec 29th, 2015
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 1.06 KB | None | 0 0
  1. #include <ButtonConstants.au3>
  2. #include <GUIConstantsEx.au3>
  3. #include <GuiStatusBar.au3>
  4. #include <StaticConstants.au3>
  5. #include <WindowsConstants.au3>
  6.  
  7. Opt("GUIOnEventMode", 1)
  8.  
  9. Global $Form1 = GUICreate("From 1 to 999999", 323, 288, 214, 125)
  10. GUISetFont(15, 400, 0, "Arial")
  11. GUISetOnEvent($GUI_EVENT_CLOSE, "Form1Close")
  12. Global $Button1 = GUICtrlCreateButton("Send", 96, 168, 131, 65)
  13. GUICtrlSetOnEvent(-1, "Button1Click")
  14. Global $Label1 = GUICtrlCreateLabel("Number: ", 64, 56, 84, 27)
  15. Global $Number = GUICtrlCreateLabel("0", 160, 56, 70, 27)
  16. GUICtrlSetColor(-1, 0x648BCB)
  17. Global $StatusBar1 = _GUICtrlStatusBar_Create($Form1)
  18. _GUICtrlStatusBar_SetText($StatusBar1, "A demo made by MrTheDzam - TCTTeaM®")
  19. GUISetState(@SW_SHOW)
  20.  
  21.  
  22. While 1
  23.     Sleep(69)
  24.     Global $GlobalNumber = GUICtrlRead($Number)
  25. WEnd
  26.  
  27. Func Button1Click()
  28.     $NewNumber = $GlobalNumber + 1
  29.     If $NewNumber <= 999999 then
  30.         GUICtrlSetData($Number, $NewNumber)
  31.     Else
  32.         MsgBox(16 + 262144, "Message", "Max value!")
  33.         Return False
  34.     EndIf
  35. EndFunc
  36.  
  37. Func Form1Close()
  38.     Exit
  39. EndFunc
Advertisement
Add Comment
Please, Sign In to add comment