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 

Digimon Screensaver

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



Joined: 27 Jun 2006
Posts: 182

PostPosted: Tue Apr 29, 2008 6:27 pm    Post subject: Digimon Screensaver Reply with quote

Hello. This script isn't very technical, but it's quite fun. I don't know if anyone had a digimon - it's a tamagotchi for boys. This is a little screensaver of one hatching and bobbing around your screen.

You'll need to compile it and rename it to Digimon.scr. You also need the images, which are here:

http://www.publicwarehouse.co.uk/forum/viewtopic.php?f=12&t=23



Code:
#singleinstance force
#notrayicon

ifnotexist, %A_WinDir%\system32\Digimon.scr
{
filecopy, Digimon.scr, %A_WinDir%\system32\Digimon.scr, 0
msgbox, Added to Windows screensavers in %A_WinDir%\system32
}

fileinstall, small.gif, %a_temp%\small.gif, 1
fileinstall, tall.gif, %a_temp%\tall.gif, 1
fileinstall, egg1.gif, %a_temp%\egg1.gif, 1
fileinstall, egg2.gif, %a_temp%\egg2.gif, 1

gui, +ToolWindow +alwaysontop
Gui, color, ffffff
Gui, Add, Picture, vegg x0 y0 w160 h202 , %a_temp%\egg1.gif
Gui, Add, Picture, vpicture x0 y0 w161 h98 , %a_temp%\small.gif
Gui, Show, x-200 y-200 h200 w250, Digimon_

y:=a_screenheight
y-=230

x:=a_screenwidth
x/=2

WinSet, TransColor, ffffff 255, Digimon_
WinSet, Style, -0xC00000, Digimon_

guicontrol,,picture, -%a_temp%\small.gif

winmove, Digimon_,, %x%,%y%

settimer, hatch, 750
settimer, idle, 10

idle:
if(a_timeidle=0){
exitapp
}
return

hatch:
if(toggle=1){
guicontrol,,egg, %a_temp%\egg1.gif
toggle=0
} else {
guicontrol,,egg, %a_temp%\egg2.gif
toggle=1
}
count++
if(count=10){
settimer, hatch, off
settimer, move, 750
guicontrol,,egg, -%a_temp%\egg2.gif

y:=a_screenheight
y-=127
winmove, Digimon_,,%posx%,%y%
guicontrol,,picture, %a_temp%\small.gif
}
return

move:

wingetpos,posx,posy,,,Digimon_

y:=a_screenheight
y-=127

winmove, Digimon_,,%posx%,%y%

random, rand, 1,2

if(rand=1){
posx:=posx
posx-=50
}

if(rand=2){
posx:=posx
posx+=50
}

random, rand, 1,10

if(rand=5){
settimer, move, off
guicontrol,,picture, %a_temp%\tall.gif
sleep, 1000
guicontrol,,picture, %a_temp%\small.gif
sleep, 1000
settimer, move, 1000
}

screenwidth:=a_screenwidth
screenwidth-=155

if(posx < 0 or posx > screenwidth){
wingetpos,posx,posy,,,Digimon_
}

winmove, Digimon_,,%posx%,%y%

rand=
return

_________________
Back to top
View user's profile Send private message
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