AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Gif-Animation with AHK

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
Rubberduck



Joined: 24 Apr 2005
Posts: 96

PostPosted: Mon Jun 06, 2005 8:23 pm    Post subject: Gif-Animation with AHK Reply with quote

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. Very Happy Very Happy

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
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10480

PostPosted: Tue Jun 07, 2005 12:02 am    Post subject: Re: Gif-Animation with AHK Reply with quote

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
View user's profile Send private message Send e-mail
Rubberduck



Joined: 24 Apr 2005
Posts: 96

PostPosted: Tue Jun 07, 2005 1:31 am    Post subject: Reply with quote

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
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10480

PostPosted: Tue Jun 07, 2005 1:39 am    Post subject: Reply with quote

Sounds about right (I didn't actually run the script).
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group