#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Res_File_Add=wait.gif, GIF, WAIT
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <GIFAnimation.au3>;https://www.autoitscript.com/forum/topic/96132-gif-animation/
#include <WinAPI.au3>
#include <WindowsConstants.au3>
Opt('MustDeclareVars', 1)
Opt('GUICloseOnESC', 0)
Opt('TrayMenuMode', 3)
Global $aGIF[2][2] = [[@ScriptDir & '\wait.gif'],[@ScriptFullPath, 'GIF;WAIT']], $hGui, $idGif
_Create_Wait_GIF($aGIF[@Compiled][0], $aGIF[@Compiled][1], $hGui, $idGif)
Sleep(Random(5000, 10000, 1))
_GIF_DeleteGIF($idGif, False)
GUIDelete($hGui)
MsgBox(64, 'Info', 'All OK!')
Func _Create_Wait_GIF($s_GIF, $s_Data, ByRef $h_Gui, ByRef $id_GIF)
$h_Gui = GUICreate('', 100, 100, -1, -1, $WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_TOPMOST, $WS_EX_TOOLWINDOW))
GUISetBkColor(0xFFFFFF)
$id_GIF = _GUICtrlCreateGIF($s_GIF, $s_Data, 0, 0, 100, 100)
_WinAPI_SetLayeredWindowAttributes($h_Gui, 0xFFFFFF, 255)
_WinAPI_SetParent($h_Gui, 0)
GUISetState(@SW_SHOWNOACTIVATE)
EndFunc ;==>_Create_Wait_GIF