jennico Posted May 19, 2009 Share Posted May 19, 2009 (edited) provides .gif and .ani animation to AutoIt, now supports all gif formats (GIF87a and GIF89a).v1.6 now even displays dynamic gifs with GDIplus.Cute and nice additions to your scripts. i hope you like it. Please leave comments.This is another final and maybe last version, as far as i can see.The UDF: _Ani.au3[autoit]#AutoIt3Wrapper_AU3Check_Parameters= -d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6#cs ;#=#INDEX#============================================================================================================================# ;# Title .........: _Ani.au3 ;# Description ...: Animated Controls (.ani/.gif) for AutoIt. ;# Date ..........: 31.05.09 ;# Version .......: 1.6 (some minor bugs fixed, added _Ani_SetGifExFrame) ;# History .......: 26.05.09 v 1.5 (added GDIplus based functions - now all GIFs should be working ! , using controlhandles instead of control IDs, bug fixing) ;# 23.05.05 v 1.4 (added _Ani_GetGifInfo(), some errors fixed, accelerated decoding, code cleaning) ;# 22.05.09 v 1.3 (GIF87a support, slow mode for problematic gifs, minor improvements) ;# 21.05.09 v 1.2 (improved timer handling, negative speed, immediate speed reaction, functions added, reduced number of callbacks, minor corrections, code designed) ;# 20.05.09 v 1.1 (added gif support, included timer functions, minor corrections) ;# 19.05.09 v 1.0 ;# Author ........: jennico (jennicoattminusonlinedotde) Edited May 31, 2009 by jennico wuuyi123 and Parsix 2 Spoiler I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.Don't forget this IP: 213.251.145.96 Link to comment Share on other sites More sharing options...
gseller Posted May 19, 2009 Share Posted May 19, 2009 As always with your script jennico, very nice example! It looks really great! Link to comment Share on other sites More sharing options...
jennico Posted May 19, 2009 Author Share Posted May 19, 2009 thank you gseller, you are always the first. how are you doing that ? j. Spoiler I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.Don't forget this IP: 213.251.145.96 Link to comment Share on other sites More sharing options...
gseller Posted May 19, 2009 Share Posted May 19, 2009 Haha, Just lucky I guess... Link to comment Share on other sites More sharing options...
jennico Posted May 19, 2009 Author Share Posted May 19, 2009 i think i am going to add gif animation. doesn't seem more complicated than ani. i think people would enjoy that. j. Spoiler I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.Don't forget this IP: 213.251.145.96 Link to comment Share on other sites More sharing options...
mesale0077 Posted May 19, 2009 Share Posted May 19, 2009 jennico,very nice your script Link to comment Share on other sites More sharing options...
gseller Posted May 19, 2009 Share Posted May 19, 2009 I think gif animation would be better just because it is an more available media for someone wanting animation. Good idea jennico... Link to comment Share on other sites More sharing options...
oMBRa Posted May 19, 2009 Share Posted May 19, 2009 Nice script jennico, but it flickers a bit to me ( am I the only one?) Link to comment Share on other sites More sharing options...
jennico Posted May 19, 2009 Author Share Posted May 19, 2009 (edited) no flickers here. Edit: there is some flickering on the button and the slider. this is caused by the changing GUI Icon. the controls themselves do not flicker. it should be possible to prevent the client area from repainting on changing GUI Icon. Edited May 19, 2009 by jennico Spoiler I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.Don't forget this IP: 213.251.145.96 Link to comment Share on other sites More sharing options...
jennico Posted May 20, 2009 Author Share Posted May 20, 2009 (edited) updated script now supports gif animations. quite satisfying, no flickering. No ? there is a vast variety of gif formats out there, so it will not display every gif file. please send me your not working files so i can improve the code ! moreover i will have to work on the timer functions and add more options. so keep on commenting here until i'm done with this ! j. Edited May 20, 2009 by jennico Spoiler I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.Don't forget this IP: 213.251.145.96 Link to comment Share on other sites More sharing options...
MrCreatoR Posted May 20, 2009 Share Posted May 20, 2009 Very good jennico!But the flickering is really there...P.SAbout the OnAutoItExit function - It is better to use some unique function name and call other function that might be set by some other UDF, here is an example of how you can do it:#Region;--------------------------Global declarations Global $sOnAutoItExit_Opt = Opt("OnExitFunc", "_Ani_OnAutoItExit_Proc") ..... ..... Func _Ani_OnAutoItExit_Proc() Call($sOnAutoItExit_Opt) FileDelete($ani_TempDir & "*") EndFunc ;==>_Ani_OnAutoItExit_ProcBTW: this is how it should be done by every UDF that uses OnAutoItExit function (to avoid conflicts with other UDFs). Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team Link to comment Share on other sites More sharing options...
wraithdu Posted May 20, 2009 Share Posted May 20, 2009 See the new AutoIt beta - it includes some different / better handling for OnAutoItStart and OnAutoItExit functions. Link to comment Share on other sites More sharing options...
MrCreatoR Posted May 20, 2009 Share Posted May 20, 2009 See the new AutoIt betaI've seen it, thanks, but it's still beta, we need to make stuff compatible with current versions - And besides that, this method should work correctly even with the new version. Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team Link to comment Share on other sites More sharing options...
jennico Posted May 20, 2009 Author Share Posted May 20, 2009 thx. well, the onexit thing does not work if you use another Opt("OnExitFunc", "__") in the parent script, because the include is executed before the parent script. to make it securely work, the parent script must as well process the same procedure you suggest.but it's sure a good idea to rename the function.j. Spoiler I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.Don't forget this IP: 213.251.145.96 Link to comment Share on other sites More sharing options...
jennico Posted May 21, 2009 Author Share Posted May 21, 2009 updated v 1.2. now several extensions and improvements, backward movement, timer handling now perfect. the coding is completed, the only thing left for me is to adapt the gif splitting for different file formats like GIF87a. please send or link me to gifs that do not work with my UDF. thx j. Spoiler I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.Don't forget this IP: 213.251.145.96 Link to comment Share on other sites More sharing options...
gseller Posted May 21, 2009 Share Posted May 21, 2009 Very Nice!! lotta hard work went into that. Kudos My Friend! Link to comment Share on other sites More sharing options...
jennico Posted May 21, 2009 Author Share Posted May 21, 2009 you really take the words out of my mind ! just before i was thinking to myself: what a small amount of lines for so much work ! the code looks so easy in the end. thx. j. Spoiler I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.Don't forget this IP: 213.251.145.96 Link to comment Share on other sites More sharing options...
gseller Posted May 21, 2009 Share Posted May 21, 2009 That is the way good code looks, like it was there all the time and just a few lines to do so much. Mine is still in the 500 lines to start a GUI(joking). I always learn something from your code, that is why I jump when I see you have a new script to share... Link to comment Share on other sites More sharing options...
jennico Posted May 22, 2009 Author Share Posted May 22, 2009 (edited) i posted v 1.3. this now supports GIF87a type gifs, too. the splitting is slower, but more precise. so i added the option to use the slow decoder for all types of gifs (flag $hslow=1). there are still some few kinds of gifs left that cannot be displayed with proper animation. the gif standard allows random frames within the picture, overlaying each other and at any global position. in this way, for example, it is possible to make a figure move in front of a background frame without displaying the background in every single frame (overlaying). or you can tile an image. or interlace it. .... or make the animation wait for user input ... of course, it is not possible to display all these kinds of gifs properly with the means of AutoIt. but for about 98% of the gif files, my UDF will do it. i think this project is done now. i have a little thing left in my mind to be done, but it's minor. so have fun everyone. i am proud for having been able to implement a real new thing to AutoIt ! j. Edited May 22, 2009 by jennico Spoiler I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.Don't forget this IP: 213.251.145.96 Link to comment Share on other sites More sharing options...
jennico Posted May 23, 2009 Author Share Posted May 23, 2009 (edited) updated to v 1.4. i had several bugs to fix and added a gif analyzing function. this will help interested users to understand this complicated file format.here is a gif file that cannot be displayed by my UDF. (yes it can ! by now)if you load it to the example file and click yes to more info, you will see the problem.maybe i will give it a try, but that's really hard work to do.cheers j. Edited May 31, 2009 by jennico Spoiler I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.Don't forget this IP: 213.251.145.96 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now