home *** CD-ROM | disk | FTP | other *** search
/ PC World 2006 February / PCWorld_2006-02_cd.bin / software / vyzkuste / triky / triky.exe / autoit-v3-setup.exe / Examples / GUICtrlCreateAvi.au3 < prev    next >
Text File  |  2005-01-07  |  555b  |  28 lines

  1. #include <GUIConstants.au3>
  2.  
  3. GUICreate ("My GUI Animation",300,200)
  4. $ani1 = GUICtrlCreateAvi (@SystemDir & "\shell32.dll",150, 50,10)
  5.  
  6. $buttonstart = GUICtrlCreateButton ("start",50,150,70,22)
  7. $buttonstop  = GUICtrlCreateButton ("stop",150,150,70,22)
  8.  
  9. GUISetState( )
  10.  
  11. ; Run the GUI until the dialog is closed
  12. While 1
  13.     $msg = GUIGetMsg()
  14.  
  15.     Select
  16.       case $msg = $GUI_EVENT_CLOSE
  17.         ExitLoop
  18.         
  19.       case $msg = $buttonstart
  20.         GUICtrlSetState ($ani1, 1)
  21.         
  22.       case $msg = $buttonstop
  23.         GUICtrlSetState ($ani1, 0)
  24.         
  25.     EndSelect
  26. Wend
  27.  
  28.