Code : Tout sélectionner
#include <GUIConstants.au3>
#include <IE.au3>
; 2 gifs animés sur 2 GUI successifs
Local $pheight = 150, $pwidth = 500, $oIE, $GUISet, $gif = 'http://louviou.net/JV/GIFs/peintre.gif'
_GifSet($gif, $pwidth, $pheight)
_IENavigate ($gif, "http://louviou.net/JV/GIFs/peintre.gif")
$centerx=(@DesktopWidth/2)-($pwidth/2)
$centery=(@DesktopHeight/2)-($pheight)
$oIE = ObjCreate("Shell.Explorer.2")
$oIE.document.body.style.border = "0px"
GUICreate($gif, 320, 150, $centerx, $centery)
$GUISet = GUICtrlCreateObj($oIE, -1, -1, $pwidth, $pheight)
$oIE.navigate ($gif)
$oIE.document.body.scroll = "no"
GUISetState()
InputBox("louviou à son chevalet", " ", "", "", 1, 1, -1, -1, $oIE)
Local $pheight = 190, $pwidth = 500, $oIE, $GUISet, $gif = 'http://louviou.net/autoit/autoit.gif'
_GifSet($gif, $pwidth, $pheight)
_IENavigate ($gif, "http://louviou.net/autoit/autoit.gif")
$centerx=(@DesktopWidth/2)-($pwidth/2)
$centery=(@DesktopHeight/2)-($pheight)
$oIE = ObjCreate("Shell.Explorer.2")
$oIE.document.body.style.border = "0px"
GUICreate($gif, 320, 190, $centerx, $centery)
$GUISet = GUICtrlCreateObj($oIE, -13, -17, $pwidth + 20, $pheight + 21)
$oIE.navigate ($gif)
$oIE.document.body.scroll = "no"
GUISetState()
InputBox("Logo AutoIt animé offert par louviou", " ", "", "", 1, 1, -1, -1, $oIE)
Exit
Func _GifSet($s_gif, ByRef $pwidth, ByRef $pheight)
If FileGetSize($s_gif) > 9 Then
Local $sizes = FileRead($s_gif, 10)
ConsoleWrite("Gif version: " & StringMid($sizes,1,6) & @LF)
$pwidth = Asc(StringMid($sizes, 8, 1)) * 256 + Asc(StringMid($sizes, 7, 1))
$pheight = Asc(StringMid($sizes, 10, 1)) * 256 + Asc(StringMid($sizes, 9, 1))
ConsoleWrite($pwidth & " x " & $pheight & @LF)
EndIf
EndFunc
; By EvilRyu, with help of autoitscript.com