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 

My Aquarium
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> General Chat
View previous topic :: View next topic  
Author Message
Rajat



Joined: 28 Mar 2004
Posts: 1718

PostPosted: Mon Nov 22, 2004 1:57 pm    Post subject: My Aquarium Reply with quote

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
View user's profile Send private message
BoBo
Guest





PostPosted: Mon Nov 22, 2004 3:02 pm    Post subject: Reply with quote

As I'm still @ work, havn't tried it yet, so im ILIA (laughing in advance) Laughing Very Happy

Hope you get boooooored more often Wink
Thx.

Cool
Back to top
exhueydriver



Joined: 12 Jul 2004
Posts: 51
Location: Fife,Wa

PostPosted: Mon Nov 22, 2004 3:48 pm    Post subject: Reply with quote

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
View user's profile Send private message
BoBo
Guest





PostPosted: Mon Nov 22, 2004 5:26 pm    Post subject: Reply with quote

I've done Link/RightClick/SaveTargetAs and downloaded it. Perfect Exclamation
Back to top
BoBo
Guest





PostPosted: Mon Nov 22, 2004 5:48 pm    Post subject: Reply with quote

The fish is there (same dir) but won't make it into the aquarium Shocked

AHK 1.0.23 (downloaded/installed a min ago)
W2K SP4

Maybe there's a shark around as well Laughing
Back to top
BoBo
Guest





PostPosted: Mon Nov 22, 2004 5:59 pm    Post subject: Reply with quote

Is there an issue with value? --> Static1/2 Crying or Very sad
Back to top
jonny



Joined: 13 Nov 2004
Posts: 3004
Location: Minnesota

PostPosted: Mon Nov 22, 2004 6:17 pm    Post subject: Reply with quote

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. Very Happy
Back to top
View user's profile Send private message
BoBo
Guest





PostPosted: Mon Nov 22, 2004 6:40 pm    Post subject: Reply with quote

@ Jonny. You know that I know - it's a template (please Rajat confirm, please, please ... Laughing )
Back to top
Titan



Joined: 11 Aug 2004
Posts: 5376
Location: /b/

PostPosted: Mon Nov 22, 2004 10:18 pm    Post subject: Reply with quote

Can't save icons, but looking from code it looks cool Cool
Back to top
View user's profile Send private message Visit poster's website
Jon



Joined: 28 Apr 2004
Posts: 373

PostPosted: Mon Nov 22, 2004 10:33 pm    Post subject: Reply with quote

unofficial mirrors-
http://hometown.aol.co.uk/JRMC137/fish2.ico
http://hometown.aol.co.uk/JRMC137/fish.ico
Back to top
View user's profile Send private message Send e-mail
Titan



Joined: 11 Aug 2004
Posts: 5376
Location: /b/

PostPosted: Mon Nov 22, 2004 11:52 pm    Post subject: Reply with quote

Jon wrote:
unofficial mirrors-
http://hometown.aol.co.uk/JRMC137/fish2.ico
http://hometown.aol.co.uk/JRMC137/fish.ico


Lol, those are not pictures, they're code Question
Back to top
View user's profile Send private message Visit poster's website
Guest






PostPosted: Tue Nov 23, 2004 10:21 am    Post subject: Reply with quote

Titan wrote:
Jon wrote:
unofficial mirrors-
http://hometown.aol.co.uk/JRMC137/fish2.ico
http://hometown.aol.co.uk/JRMC137/fish.ico


Lol, those are not pictures, they're code Question


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

PostPosted: Tue Nov 23, 2004 11:35 am    Post subject: Reply with quote

haha thats kool Rajat thanx Cool Cool
_________________
^sleepy^
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
BoBo
Guest





PostPosted: Tue Nov 23, 2004 12:48 pm    Post subject: Reply with quote

Quote:
Lol, those are not pictures, they're code


I've compiled it - and guess what I've got Exclamation shark.ico Exclamation aka it's malicious fish code !

Laughing
Back to top
Rajat



Joined: 28 Mar 2004
Posts: 1718

PostPosted: Tue Nov 23, 2004 6:19 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> General Chat All times are GMT
Goto page 1, 2, 3  Next
Page 1 of 3

 
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