Yashied

Animate UDF

26 posts in this topic

#1 ·  Posted (edited)

LAST VERSION - 1.2

27-Dec-11

This UDF helps you to create animated icon in the system tray (only one icon can be used). Very easy to use! I hope that it will be useful for someone. To work properly the example which is shown below, you need to download an archive containing the necessary icons. Any feedback and suggestions please.

Flag.gif

Available functions

_Animate_AddIcon

_Animate_IsAnimate

_Animate_LoadFromBitmap

_Animate_LoadFromFile

_Animate_SetDelay

_Animate_ShowIcon

_Animate_Start

_Animate_Stop

_Animate_Release

Animate UDF Library v1.2

Previous downloads: 1112

Animate.zip

Example

#Include <GUIConstantsEx.au3>
#Include <SliderConstants.au3>
#Include <StaticConstants.au3>
#Include <WindowsConstants.au3>

#Include "Animate.au3"

Opt('MustDeclareVars', 1)
Opt('TrayAutoPause', 0)

Global $Button, $Slider, $Msg

_Animate_LoadFromFile(@ScriptDir & '\Flag.png')

;~For $i = 1 To 12
;~  _Animate_AddIcon(@ScriptDir & '\Flag\' & $i & '.ico', 0)
;~Next

_Animate_SetDelay(50)
_Animate_ShowIcon()

GUICreate('Animation Test', 400, 110)
GUICtrlCreateLabel('Fast', 10, 30, 28, 14, $SS_RIGHT)
GUICtrlCreateLabel('Slow', 355, 30, 28, 14)
$Slider = GUICtrlCreateSlider(42, 25, 310, 26, BitOR($TBS_AUTOTICKS, $WS_TABSTOP))
GUICtrlSendMsg(-1, $TBM_SETTICFREQ, 10, 0)
GUICtrlSetLimit(-1, 250, 10)
GUICtrlSetData(-1, 50)
$Button = GUICtrlCreateButton('Start', 160, 75, 80, 25)
GUICtrlSetState(-1, BitOR($GUI_DEFBUTTON, $GUI_FOCUS))
GUISetState()

While 1
    $Msg = GUIGetMsg()
    Switch $Msg
        Case $GUI_EVENT_CLOSE
            ExitLoop
        Case $Slider
            _Animate_SetDelay(GUICtrlRead($Slider))
        Case $Button
            If _Animate_IsAnimate() Then
                GUICtrlSetData($Button, 'Start')
                _Animate_Stop()
            Else
                GUICtrlSetData($Button, 'Stop')
                _Animate_Start()
            EndIf
    EndSwitch
WEnd
Edited by Yashied
2 people like this

Share this post


Link to post
Share on other sites



Nice work Yashied! In my opinion it is usefull because having just the standard icon in the taskbar an animated one looks much better!

What might be unfavorable is to have a lot of .ico files for animation. Is it possible to use animated GIFs/PNGs?

Thanks for sharing.

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

Nice work Yashied! In my opinion it is usefull because having just the standard icon in the taskbar an animated one looks much better!

What might be unfavorable is to have a lot of .ico files for animation. Is it possible to use animated GIFs/PNGs?

Thanks for sharing.

UEZ

Well, Gif`s not ideal, because they do not support full transparency, but I thought about PNG.

Share this post


Link to post
Share on other sites
Very nice work ! :)

Share this post


Link to post
Share on other sites

Very nice Idea! Thanks :)


UnderWorldVN- Just play the way you like it

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Thanks for the update Yashied! Now supporting animated PNGs :)

Are animated GIFs also supported? I tried one but no animation - just a still picture.

Further, how can I create animated PNGs? Or convert animated GIFs to PNGs?

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

Thanks for the update Yashied! Now supporting animated PNGs :)

Are animated GIFs also supported? I tried one but no animation - just a still picture.

Further, how can I create animated PNGs? Or convert animated GIFs to PNGs?

UEZ

1. GIF`s are not supported. This is antiquity. :)

2. The easiest way - Photoshop (ImageReady), also there are many programs to do so. Creating animated PNG`s goes beyond this work.

Share this post


Link to post
Share on other sites

Wow you should have MVP status this like all your scripts are great!!


[Cheeky]Comment[/Cheeky]

Share this post


Link to post
Share on other sites

Real nice but it is a shame we can't make them bigger. Size seems to only support 192 x 16, am I correct?

I think it would be real cool to be able to do this bigger and as a GUI. I have about 5000 png strips. LOL

From Pac-man to war png files.

Share this post


Link to post
Share on other sites

Looks Awesome!!!!

Now find a program to use it on

Thanks Mate!

Share this post


Link to post
Share on other sites

Awesome

you could load the same "png"but in a window?

and larger images or to use such images? --> http://goo.gl/TuySE

Share this post


Link to post
Share on other sites

all i can say---> NICE NICE NICE!!!!!!!!!!!!!!!!!!!!!

good work, i was looking for something like this;)


as finishing touch god created the dutch

Share this post


Link to post
Share on other sites

Awesome work!

Is there a way to do a digital clock (replacing the Windows System Tray clock)?

Thanks.

Share this post


Link to post
Share on other sites

i like it very much, tku

Share this post


Link to post
Share on other sites

#18 ·  Posted (edited)

The library has been updated.

v1.2

  • Improved icons display that were loaded from the PNG files by using _Animate_LoadFromBitmap() or _Animate_LoadFromFile() functions.
  • The title of the AutoIt window now does not change.
  • Code improvement.

Edited by Yashied

Share this post


Link to post
Share on other sites

Hey,

cool stuff, but doesnt work anymore :(!

Could you fix it, please :)?

Best Regards

Aca

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