anhdh

Untitled

Jun 15th, 2016
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 1.08 KB | None | 0 0
  1.  
  2. #include <GuiListBox.au3>
  3. #include <Date.au3>
  4.  
  5. #Region ### START Koda GUI section ### Form=
  6. ;~ bla bala
  7. $TextLog = GUICtrlCreateGroup("Log", 242, 8, 273, 314)
  8. $List1 = GUICtrlCreateList("", 242, 23, 265, 292, $LBS_DISABLENOSCROLL)
  9. GUICtrlSetData(-1, "")
  10. GUICtrlSetBkColor(-1, 0xE3E3E3)
  11. GUICtrlCreateGroup("", -99, -99, 1, 1)
  12. ;~ bla bala
  13. #EndRegion ### END Koda GUI section ###
  14. $TimeStart = GUICtrlCreateInput("0", 40, 272, 73, 21)
  15. $TimeEnd = GUICtrlCreateInput("10000", 152, 272, 81, 21)
  16. $random = Random(GUICtrlRead($TimeStart),GUICtrlRead($TimeEnd))
  17. AddString("Vui Lòng Chờ "&$random)
  18. msgbox(4096, "", $random)
  19. $IRandom = BinaryToString($random )
  20. Sleep($random)
  21. Local $stt = 1
  22.  
  23. Func AddString($String)
  24.  
  25. ; Add strings
  26. _GUICtrlListBox_BeginUpdate($List1)
  27. _GUICtrlListBox_AddString($List1,$stt & ". "& _NowTime(5) & ":"& $String)
  28. _GUICtrlListBox_UpdateHScroll($List1)
  29. _GUICtrlListBox_EndUpdate($List1)
  30. _AutoScroll()
  31. $stt +=1
  32. EndFunc   ;==>AddString
  33. Func _AutoScroll()
  34.     _GUICtrlListBox_SetAnchorIndex($List1 , _GUICtrlListBox_GetListBoxInfo($List1)-1)
  35. EndFunc ;==>_AutoScroll
Advertisement
Add Comment
Please, Sign In to add comment