Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #NoTrayIcon
- #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
- #AutoIt3Wrapper_Version=Beta
- #AutoIt3Wrapper_Outfile=funciones_x86.exe
- #AutoIt3Wrapper_Outfile_x64=funciones_x64.exe
- #AutoIt3Wrapper_Compression=4
- #AutoIt3Wrapper_Compile_Both=y
- #AutoIt3Wrapper_UseX64=y
- #AutoIt3Wrapper_Res_requestedExecutionLevel=asInvoker
- #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
- #cs ----------------------------------------------------------------------------
- AutoIt Version: 3.3.8.1
- Author: Jesux Herrera - AutoitHacks Admin
- Webpage: www.autoithacks.tk
- Post: http://www.autoithacks.tk/2012/05/ejemplo-de-funciones/
- Script Function:
- Ejemplo de Funciones con Do Until y Transparencia
- #ce ----------------------------------------------------------------------------
- #include <ButtonConstants.au3>
- #include <GUIConstantsEx.au3>
- #include <WindowsConstants.au3>
- $Form1 = GUICreate("Funciones!!", 291, 138, -1, -1)
- $Button1 = GUICtrlCreateButton("Iniciar", 40, 24, 211, 25)
- $Button2 = GUICtrlCreateButton("Segunda Funcion", 40, 56, 211, 25)
- $Button3 = GUICtrlCreateButton("Despedida", 40, 88, 211, 25)
- $Label1 = GUICtrlCreateLabel("www.autoithacks.tk", 96, 120, 98, 17)
- GUICtrlSetState($Button2, $GUI_DISABLE)
- GUICtrlSetState($Button3, $GUI_DISABLE)
- GUISetState(@SW_SHOW)
- While 1
- $nMsg = GUIGetMsg()
- Switch $nMsg
- Case $GUI_EVENT_CLOSE
- Exit
- Case $Button1
- WinSetTrans($Form1,"", 255)
- _uno()
- GUICtrlSetState($Button1, $GUI_DISABLE)
- GUICtrlSetState($Button2, $GUI_ENABLE)
- ContinueCase
- Case $Button2
- WinSetTrans($Form1,"", 0)
- _dos()
- GUICtrlSetState($Button2, $GUI_DISABLE)
- ContinueCase
- Case $Button3
- GUICtrlSetData($Button3,"Adios!")
- _tres()
- EndSwitch
- WEnd
- Func _uno()
- Local $i = 255
- Do
- GUICtrlSetData($Button1, $i)
- WinSetTrans($Form1,"", $i)
- WinSetTitle($Form1,"", "Cargando.. " & $i & "%")
- Sleep(10)
- $i = $i - 1
- Until $i = 0
- GUICtrlSetData($Button1,"")
- EndFunc
- Func _dos()
- Local $i = 0
- Do
- GUICtrlSetData($Button2, $i)
- WinSetTrans($Form1,"", $i)
- WinSetTitle($Form1,"", "Cargando.. " & $i & "%")
- Sleep(10)
- $i = $i + 1
- Until $i = 255
- GUICtrlSetData($Button2,"")
- EndFunc
- Func _tres()
- Local $i = 255
- Do
- WinSetTrans($Form1,"", $i)
- WinSetTitle($Form1,"", "Cargando.. " & $i & "%")
- Sleep(10)
- $i = $i - 1
- Until $i = 0
- Exit
- EndFunc
Advertisement
Add Comment
Please, Sign In to add comment