 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Rajat
Joined: 28 Mar 2004 Posts: 1718
|
Posted: Mon Nov 22, 2004 1:57 pm Post subject: My Aquarium |
|
|
Not a utility. Not useful. Just something i did while getting bored.
A little box with a fish swimming here n there in random paths.
To try just put both of these files in script's folder and run.
http://drop.io/myfishy
Maybe someday someone will write a game in ahk... ;)
| Code: |
; Generated by SmartGUI Creator 3.2
Gui, color, 0xA2C6EC
Gui, Add, Picture, +BackgroundTrans AltSubmit x333 y166 w32 h32, %a_scriptdir%\fish.ico
Gui, Add, Picture, +BackgroundTrans AltSubmit x-50 y-50 w32 h32, %a_scriptdir%\fish2.ico
Gui, Show, x158 y110 h350 w450, Rajat's Aquarium
Goto, MoveFish
GuiClose:
ExitApp
MoveFish:
CurrFish = Static1
OtherFish = Static2
Loop
{
Random, UpDn, 1, 2
Random, DistUpDn, 5, 10
Loop, %DistUpDn%
{
ControlGetPos, F1X, F1Y,,, %CurrFish%, Rajat's Aquarium
IfEqual, UpDn, 1
IfGreater, F1Y, 40
F1Y -= 2
IfEqual, UpDn, 2
IfLess, F1Y, 340
F1Y += 2
IfEqual, GoRight, 1
F1X += 2
Else
F1X -= 2
ControlMove, %CurrFish%, %F1X%, %F1Y%,,, Rajat's Aquarium
sleep, 30
Gosub, CheckPos
}
}
Return
CheckPos:
ControlGetPos, F1X, F1Y,,, %CurrFish%, Rajat's Aquarium
WinGetPos, WinX, WinY, WinW, WinH, Rajat's Aquarium
IfLess, F1X, 0
{
Control, Hide,, %CurrFish%, Rajat's Aquarium
ControlMove, %OtherFish%, %F1X%, %F1Y%,,, Rajat's Aquarium
Control, Show,, %OtherFish%, Rajat's Aquarium
TempStor = %CurrFish%
CurrFish = %OtherFish%
OtherFish = %TempStor%
GoRight = 1
}
IfGreater, F1X, %WinW%
{
Control, Hide,, %CurrFish%, Rajat's Aquarium
ControlMove, %OtherFish%, %F1X%, %F1Y%,,, Rajat's Aquarium
Control, Show,, %OtherFish%, Rajat's Aquarium
TempStor = %CurrFish%
CurrFish = %OtherFish%
OtherFish = %TempStor%
GoRight = 0
}
Return
|
_________________

Last edited by Rajat on Sun Jan 27, 2008 6:54 pm; edited 2 times in total |
|
| Back to top |
|
 |
BoBo Guest
|
Posted: Mon Nov 22, 2004 3:02 pm Post subject: |
|
|
As I'm still @ work, havn't tried it yet, so im ILIA (laughing in advance)
Hope you get boooooored more often
Thx.
 |
|
| Back to top |
|
 |
exhueydriver
Joined: 12 Jul 2004 Posts: 51 Location: Fife,Wa
|
Posted: Mon Nov 22, 2004 3:48 pm Post subject: |
|
|
As always, Thanks, Rajat, but angelfire doesn't like your links-
"Angelfire does not allow direct linking
from offsite, non-Angelfire pages,
to files hosted on Angelfire.
This practice of 'remote linking' reduces
our ability to serve out the homepages
of our members quickly and efficiently. "
Anxiously awaiting a new d\l site.
Don |
|
| Back to top |
|
 |
BoBo Guest
|
Posted: Mon Nov 22, 2004 5:26 pm Post subject: |
|
|
I've done Link/RightClick/SaveTargetAs and downloaded it. Perfect  |
|
| Back to top |
|
 |
BoBo Guest
|
Posted: Mon Nov 22, 2004 5:48 pm Post subject: |
|
|
The fish is there (same dir) but won't make it into the aquarium
AHK 1.0.23 (downloaded/installed a min ago)
W2K SP4
Maybe there's a shark around as well  |
|
| Back to top |
|
 |
BoBo Guest
|
Posted: Mon Nov 22, 2004 5:59 pm Post subject: |
|
|
Is there an issue with value? --> Static1/2  |
|
| Back to top |
|
 |
jonny
Joined: 13 Nov 2004 Posts: 3004 Location: Minnesota
|
Posted: Mon Nov 22, 2004 6:17 pm Post subject: |
|
|
| Quote: | My Home Page
My Favorite things about Angelfire.
* Easy
* Fast
* Fun
My Favorite Web Sites
Angelfire - Free Home Pages
Free Web Building Help
Angelfire HTML Library
HTML Gear - free polls, guestbooks, and more!
Thank you for visiting my page at Angelfire. Please come back and visit again! |
Rajat, please say you didn't write this home page.  |
|
| Back to top |
|
 |
BoBo Guest
|
Posted: Mon Nov 22, 2004 6:40 pm Post subject: |
|
|
@ Jonny. You know that I know - it's a template (please Rajat confirm, please, please ... ) |
|
| Back to top |
|
 |
Titan
Joined: 11 Aug 2004 Posts: 5376 Location: /b/
|
Posted: Mon Nov 22, 2004 10:18 pm Post subject: |
|
|
Can't save icons, but looking from code it looks cool  |
|
| Back to top |
|
 |
Jon
Joined: 28 Apr 2004 Posts: 373
|
|
| Back to top |
|
 |
Titan
Joined: 11 Aug 2004 Posts: 5376 Location: /b/
|
Posted: Mon Nov 22, 2004 11:52 pm Post subject: |
|
|
Lol, those are not pictures, they're code  |
|
| Back to top |
|
 |
Guest
|
Posted: Tue Nov 23, 2004 10:21 am Post subject: |
|
|
| Titan wrote: |
Lol, those are not pictures, they're code  |
They are definetely pictures but it looks like you've got to select "all files" and change the extension to ico when you download them.
Here is a zipped version instead-
http://hometown.aol.co.uk/JRMC137/fish.zip |
|
| Back to top |
|
 |
sleepyy35
Joined: 22 Jul 2004 Posts: 194 Location: cedar city UT
|
Posted: Tue Nov 23, 2004 11:35 am Post subject: |
|
|
haha thats kool Rajat thanx  _________________ ^sleepy^ |
|
| Back to top |
|
 |
BoBo Guest
|
Posted: Tue Nov 23, 2004 12:48 pm Post subject: |
|
|
| Quote: | | Lol, those are not pictures, they're code |
I've compiled it - and guess what I've got shark.ico aka it's malicious fish code !
 |
|
| Back to top |
|
 |
Rajat
Joined: 28 Mar 2004 Posts: 1718
|
Posted: Tue Nov 23, 2004 6:19 pm Post subject: |
|
|
thanx Jon for giving alternate location for files, i've updated the main post to show them.
and no ... i didn't do the homepage... i just didn't change it. _________________
 |
|
| 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
|