AutoitHacks

Barra de Progreso [Progress Bar]

Jun 9th, 2012
870
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 2.02 KB | None | 0 0
  1. ;===========================================;
  2. ;  Creado por Jesux Herrera (Author)
  3. ;  www.autoithacks.tk
  4. ;  http://www.facebook.com/pages/AutoIt-Hacks-Mexico/211931559655
  5. ;  https://twitter.com/#!/AutoitHacks
  6. ;  http://www.youtube.com/user/autoithacks
  7. ;  " a ti mi amada Maricela "
  8. ;===========================================;
  9.  
  10. #include <ButtonConstants.au3>
  11. #include <GUIConstantsEx.au3>
  12. #include <ProgressConstants.au3>
  13. #include <WindowsConstants.au3>
  14.  
  15. Ejemplo()
  16.  
  17.  
  18.  Func Ejemplo()
  19.  
  20.      $Form = GUICreate("Barra de Progreso - Ejemplo", 333, 141, -1, -1)
  21.      $Group1 = GUICtrlCreateGroup("", 8, 8, 313, 121)
  22.      $Progress1 = GUICtrlCreateProgress(24, 32, 278, 24)
  23.      $ejemplo1 = GUICtrlCreateButton("Ejemplo1", 40, 80, 75, 25)
  24.      $ejemplo2 = GUICtrlCreateButton("Ejemplo2", 128, 80, 75, 25)
  25.      $creditos = GUICtrlCreateButton("Creditos", 216, 80, 75, 25)
  26.      GUICtrlCreateGroup("", -99, -99, 1, 1)
  27.      GUISetState(@SW_SHOW)
  28.  
  29.      Local $inicio = 0
  30.      Local $final = 100
  31.      Local $espera = 10
  32.  
  33.         While 1
  34.           $nMsg = GUIGetMsg()
  35.           Switch $nMsg
  36.             Case $GUI_EVENT_CLOSE
  37.               Exit
  38.  
  39.                  Case $ejemplo1
  40.                      Do
  41.                          GUICtrlSetData($Progress1, $inicio)
  42.                          $inicio = $inicio + 1
  43.                          Sleep($espera)
  44.                      Until $inicio = 100
  45.                      GUICtrlSetData($Progress1,0)
  46.  
  47.                  Case $ejemplo2
  48.                      Do
  49.                          GUICtrlSetData($Progress1, $final)
  50.                          $final = $final - 1
  51.                          Sleep($espera)
  52.                      Until $final = 0
  53.                      GUICtrlSetData($Progress1,0)
  54.  
  55.                  Case $creditos
  56.                      MsgBox(0,"AutoitHacks :D","Creado por Jesux Herrera - AutoitHacks Admin" & @CRLF & @CRLF & "Pagina: www.autoithacks.tk" & @CRLF & "Pastebin: http://pastebin.com/u/autoithacks" & @CRLF & "Facebook: http://www.facebook.com/pages/AutoIt-Hacks-Mexico/211931559655" & @CRLF & "Twitter: https://twitter.com/#!/AutoitHacks" & @CRLF & "Youtube: http://www.youtube.com/user/autoithacks" & @CRLF & "Mail: [email protected]" & @CRLF & @CRLF & "Maricela </3  u.u")
  57.  
  58.          EndSwitch
  59.          WEnd
  60.  
  61.  EndFunc
Advertisement
Add Comment
Please, Sign In to add comment