Jump to content

Leaderboard


Popular Content

Showing most liked content since 07/24/2019 in all areas

  1. 2 points
    Olá, Compartilhando um script de efeitos de entrada e saída de GUI utilizando a função _WinAPI_AnimateWindow Deve ser usado junto com GUISetState() #cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.14.5 Author: Rodrigo Chaves Script Function: Animate Window 07/2019 Base de pesquisa https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-animatewindow #ce ---------------------------------------------------------------------------- #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <WinAPIDiag.au3> ;Variaveis de efeitos Dim Const $tSTRUCT = 'struct;char fadeIn[128];char fadeOut[128];char Slide_In_Left[128];char Slide_Out_Left[128];char Slide_In_Right[128];char Slide_Out_Right[128];char Slide_In_Top[128];char Slide_Out_Top[128];' & _ 'char Slide_In_Bottom[128];char Slide_Out_Bottom[128];char DiagSlide_In_TopLeft[128];char DiagSlide_Out_TopLeft[128];char DiagSlide_In_TopRight[128];char DiagSlide_Out_TopRight[128];' & _ 'char DiagSlide_In_BottomLeft[128];char DiagSlide_Out_BottomLeft[128];char DiagSlide_In_BottomRight[128];char DiagSlide_Out_BottomRight[128];char explode[128];char implode[128];endstruct' Dim $oAW = DllStructCreate($tSTRUCT) $oAW.fadeIn = 0x00080000 $oAW.fadeOut = 0x00090000 $oAW.slide_In_Left = 0x00040001 $oAW.slide_Out_Left = 0x00050002 $oAW.slide_In_Top = 0x00040004 $oAW.slide_Out_Top = 0x00050008 $oAW.slide_In_Right = 0x00040002 $oAW.slide_Out_Right = 0x00050001 $oAW.slide_In_Bottom = 0x00040008 $oAW.slide_Out_Bottom = 0x00050004 $oAW.diagSlide_In_TopLeft = 0x00040005 $oAW.diagSlide_Out_TopLeft = 0x0005000a $oAW.diagSlide_In_TopRight = 0x00040006 $oAW.diagSlide_Out_TopRight = 0x00050009 $oAW.diagSlide_In_BottomLeft = 0x00040009 $oAW.diagSlide_Out_BottomLeft = 0x00050006 $oAW.diagSlide_In_BottomRight = 0x0004000a $oAW.diagSlide_Out_BottomRight = 0x00050005 $oAW.explode = 0x00040010 $oAW.implode = 0x00050010 ;Verificar a estrutura da variavel ;~ _WinAPI_DisplayStruct($oAW, $tSTRUCT) ;Variaveis de cores Dim Const $tagSTRUCT = 'struct;char white[8];char black[8];char dark[8];char light[8];char darkLight[8];char aqua[8];char alpha[2];endstruct' Dim $oColor = DllStructCreate($tagSTRUCT) $oColor.white = 0xFFFFFF $oColor.black = 0x000000 $oColor.dark = 0x202020 $oColor.light = 0xf5f6f7 $oColor.darkLight = 0x323232 $oColor.aqua = 0x00f2ff $oColor.alpha = -2 ;Verificar a estrutura da variavel ;~ _WinAPI_DisplayStruct($oColor, $tagSTRUCT) ;Texto de exemplo Dim $sSampleText = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor ' & _ 'incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud ' & _ 'exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure ' & _ 'dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur ' & _ 'sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.' $hWnd_Main = GUICreate("", 615, 437, -1, -1, $WS_POPUPWINDOW, $WS_EX_TOPMOST) GUISetBkColor($oColor.dark) $aGetPos = WinGetPos($hWnd_Main) $sLabel_Title = GUICtrlCreateLabel(" Exemplo de janela animada", 0, 0, $aGetPos[2] - 2, 17, $SS_CENTERIMAGE, $GUI_WS_EX_PARENTDRAG) GUICtrlSetFont(-1, 10, 400, 0, "Segoe UI") GUICtrlSetBkColor(-1, $oColor.darkLight) GUICtrlSetColor(-1, $oColor.white) $Label2 = GUICtrlCreateLabel($sSampleText, 35, 40, 546, 337) GUICtrlSetFont(-1, 11, 400, 0, "Segoe UI") GUICtrlSetColor(-1, $oColor.white) $idBtn_Run = GUICtrlCreateButton("Run Effect", 430, 385, 75, 25) $idBtn_Exit = GUICtrlCreateButton("Exit", 510, 385, 75, 25) GUISetState(@SW_SHOW) ;Cria um sublinhado na barra de titulo $lineGraphic = GUICtrlCreateGraphic(0, 18, $aGetPos[2] - 1, 1) GUICtrlSetBkColor(-1, $oColor.aqua) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE, $idBtn_Exit Exit Case $idBtn_Run GUICtrlSetState($idBtn_Run, $GUI_HIDE) GUISetState(@SW_HIDE, $hWnd_Main) Sleep(1500) For $i = 1 To 20 ;Coleta o valor da variavel da estrutura $oAW $getAW = DllStructGetData($oAW, $i) ;Aplica o efeito _WinAPI_AnimateWindow($hWnd_Main, $getAW, 300) Sleep(200) Next ;Aplica o efeito de entrada fade-in com tempo de entrada de 1s (1000ms) _WinAPI_AnimateWindow($hWnd_Main, $oAW.fadeIn, 1000) ;Recolore o sublinhado GUICtrlSetBkColor($lineGraphic, $oColor.aqua) GUISetState(@SW_SHOW) GUICtrlSetState($idBtn_Run, $GUI_SHOW) EndSwitch WEnd
  2. 1 point
    Olá, Compartilhando um script de efeitos com direct3D9 usando a biblioteca au3Irrlicht2.au3 #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Res_Description=Background Sample #AutoIt3Wrapper_Res_Fileversion=1.0.0.0 #AutoIt3Wrapper_Res_ProductVersion=1.0.0.0 #AutoIt3Wrapper_Res_LegalCopyright=rcneto #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.14.5 Author: Rodrigo Chaves Script Function: Background Sample 07/2019 #ce ---------------------------------------------------------------------------- #include "au3Irrlicht2.au3" Opt("MustDeclareVars", True) HotKeySet("{ESC}", "_exit") Dim $camera Dim $cameraNode Dim $cloudTexture Dim $cloudNode Dim $aVector3Df[3] SplashTextOn('Background Sample', 'Por favor aguarde - Iniciando audio', 350, 110, -1, -1, 32) SoundPlay(@ScriptDir & '\Media\audio.mp3') Sleep(3000) SplashOff() _irrStart($irr_Edt_Direct3D9, 1024, 768, $irr_Bits_Per_Pixel_32, $irr_Windowed, $irr_Shadows, $irr_Ignore_Events, $irr_Vertical_Sync_On) _irrSetResizableWindow($irr_on) _irrSetWindowCaption("Background Sample / Pressione Esc para fechar") $cloudTexture = _irrGetTexture("media/cloud1.bmp") $cloudNode = _irrAddClouds($cloudTexture, 1, 1000, 3100) _irrSetNodeMaterialFlag($cloudNode, $irr_Emf_Fog_Enable, $irr_On) _irrSetNodePosition($cloudNode, 4000, 100, 4000) _irrAddRotationAnimator($cloudNode, 0.05, 0.08, 0.05) $camera = _irrAddCamera(0, 0, 0, 0, 0, 0) $cameraNode = $camera _irrSetNodePosition($cameraNode, 4000, 2000.7, 20000.9) _irrSetCameraFov($cameraNode, 1.55) _irrSetCameraClipDistance($camera, 12000) _irrSetAmbientLight(0.1, 0.1, 0.1) While _irrRunning() _irrBeginScene(130, 130, 255) $aVector3Df = _irrGetNodePosition($cameraNode) _irrDrawScene() _irrEndScene() WEnd _irrStop() Func _exit() _irrstop() Exit EndFunc https://www.youtube.com/watch?v=lo03F6CpXXc&feature=youtu.be O código fonte, biblioteca e arquivos de mídia estão no link abaixo https://1drv.ms/u/s!AnsPM67Cyv4XjJF_gnMKVuSCQdpdig?e=QM0aa8
×