 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Rubberduck
Joined: 24 Apr 2005 Posts: 96
|
Posted: Mon Jun 06, 2005 8:23 pm Post subject: Gif-Animation with AHK |
|
|
I have tried to do Animation.
The animation-files are
http://autohotkey.net/file/user/pub/animation.rar
Place them in the same folder where you save this testscript.
The single Files have the wrong background-color, but I think
for testing-purposes it is good enough.
| Code: |
Z_UpdateSpeed = 100 ; This is the default screen update speed
actpic = 1
Gui, Add, Picture, x10 y10 w32 h32, dogr_frame_001.bmp
Gui, Show, , Gif-Animation
SetTimer, Animation, %Z_UpdateSpeed%
Return
GuiClose:
ExitApp
Animation:
{
actpic++
if (actpic>6)
actPic=1
Gui, Add, Picture, x10 y10 w32 h32, dogr_frame_00%ActPic%.bmp
}
|
This script was done quick and dirty.
I am not sure if this script is done write, because I am not sure
if the pictures are endlessly added to the GUI.
I think the AHK-Freaks can make a better code.
P.S. I looked for the translation of freak. I was told it is a monstrum
(monster) ?? Freak is a english word that is also used in german,
but if I use it (I think most german users use it this way) I am thinking
of a person that is a professional in something. So a AHK-freak for
me is a person that is really good in using (programming ) AHK. _________________ Wer keine Antworten hat muss nicht dumm sein,
dumm ist nur der welcher keine Fragen hat. |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10480
|
Posted: Tue Jun 07, 2005 12:02 am Post subject: Re: Gif-Animation with AHK |
|
|
| Rubberduck wrote: | | I am not sure if this script is done write, because I am not sure if the pictures are endlessly added to the GUI. | Yes, "Gui Add" will add a new control each time (on top of the previous one). You can substitute the following for the bottom line to prevent that:
GuiControl, , MyPicture, *x10 *y10 *w32 *h32 dogr_frame_00%ActPic%.bmp
Thanks for posting it. |
|
| Back to top |
|
 |
Rubberduck
Joined: 24 Apr 2005 Posts: 96
|
Posted: Tue Jun 07, 2005 1:31 am Post subject: |
|
|
I replaced my line of code with yours, but nothing happend.
I think I also must add the variable vMyPicture to the first GUI.ADD on top of the script ??
Then the dog runs without adding a picture again and again to the GUI? _________________ Wer keine Antworten hat muss nicht dumm sein,
dumm ist nur der welcher keine Fragen hat. |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10480
|
Posted: Tue Jun 07, 2005 1:39 am Post subject: |
|
|
| Sounds about right (I didn't actually run the script). |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|