Jump to content
Sign in to follow this  
BSHARK

Compiled GIF Splash screen error

Recommended Posts

BSHARK

Hello every body

can any one tell me whats wrong in this code

i try to make a "please wait" animated gif like splash screen ...

the problem is when i compile the image in the same exe file no image appears

i think the error is in this line

_ResourceSetImageToCtrl($obj.filename, "TEST_GIF_3")

and how i can compile the gif89.dll file .. i think if i compile it this line should be changed

FileCopy ("gif89.dll", "C:\Windows\system32",1)

my entire code

#NoTrayIcon
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Res_File_Add=image3.GIF, rt_rcdata, TEST_GIF_3
#AutoIt3Wrapper_Res_File_Add=image2.GIF, rt_rcdata, TEST_GIF_2
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <StaticConstants.au3>
#include "resources.au3"


FileCopy ("gif89.dll", "C:\Windows\system32",1)
Runwait ("REGSVR32 /S gif89.dll")

$HWnd = GUICreate("GIFanime", 172, 62, -1, -1, $WS_POPUP,$WS_EX_LAYERED)
GUICtrlCreatePic("",-1,-1, 172, 62, $SS_SUNKEN)
GUISetState(@SW_SHOW)

$obj = ObjCreate("Gif89.Gif89.1")
GUICtrlCreateObj( $obj, 0, 0 , 172, 62)
_ResourceSetImageToCtrl($obj.filename, "TEST_GIF_3")

$PID = Run("Setup.exe /S")
ProcessWaitClose($PID)


$HWnd = GUICreate("GIFanime", 172, 62, -1, -1, $WS_POPUP,$WS_EX_LAYERED)
GUICtrlCreatePic("",-1,-1, 172, 62, $SS_SUNKEN)
GUISetState()
$obj = ObjCreate("Gif89.Gif89.1")
GUICtrlCreateObj( $obj, 0, 0 , 172, 62)
_ResourceSetImageToCtrl($obj.filename, "TEST_GIF_3")
Sleep (2000)
exit
Edited by BSHARK

Share this post


Link to post
Share on other sites
BSHARK

can any one help me please ...

is it that hard to solve it ?

Share this post


Link to post
Share on other sites
BSHARK

i found a better way to make an animated gif splash screen

here's the code

#AutoIt3Wrapper_Au3Check_Parameters=-w 1 -w 2 -w 3 -w 4 -w 5 -w 6
#NoTrayIcon
;.......script written by trancexx (trancexx at yahoo dot com)

#include <WindowsConstants.au3>
#include "GIFAnimation.au3"



Global $sFile = @scriptDir & "\splash1.gif"
Global $aGIFDimension = _GIF_GetDimension($sFile)
Global $hGui = GUICreate("GIF Animation", $aGIFDimension[0], $aGIFDimension[1], -1, -1, $WS_POPUP, $WS_EX_TOPMOST)
Global $pGIF
Global $hGIF = _GUICtrlCreateGIF($sFile, "", 10, 10, $pGIF)
GUIRegisterMsg(15, "_Refresh"); WM_PAINT
GUICtrlSetPos($hGIF, 0, 0)
GUISetState()

$PID = Run("Setup.exe /S")
ProcessWaitClose($PID)


Global $sFile = @scriptDir & "\Splash2.gif"
Global $aGIFDimension = _GIF_GetDimension($sFile)
Global $hGui = GUICreate("GIF Animation", $aGIFDimension[0], $aGIFDimension[1], -1, -1, $WS_POPUP, $WS_EX_TOPMOST)
Global $pGIF
Global $hGIF = _GUICtrlCreateGIF($sFile, "", 10, 10, $pGIF)
GUIRegisterMsg(15, "_Refresh"); WM_PAINT
GUICtrlSetPos($hGIF, 0, 0)
GUISetState()
Sleep (2000)

the problem is how to add or compile the gif files into the exe ?

Share this post


Link to post
Share on other sites
UEZ

Have a look here: #831851

Maybe you can use this method to embed images into your script to display images. ;)

Br,

UEZ

Edited by UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×