AutoHotkey Community

It is currently May 26th, 2012, 3:55 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Digimon Screensaver
PostPosted: April 29th, 2008, 6:27 pm 
Offline

Joined: June 27th, 2006, 4:36 pm
Posts: 182
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

Image

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

_________________
Image Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 26th, 2008, 3:19 am 
hehe neat images,
maybe it could evolve to a Invaderz game in screensaver mode!


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: oldbrother and 11 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group