Sign in to follow this  
Followers 0
CoderDunn

Harmless April Fools Joke

12 posts in this topic

#1 ·  Posted (edited)

I made this for my mom's computer on april fools day. All it does is create a golf ball the bounces around your screen and off windows. It can help pass the time if you're really bored :)

There are two versions. The standard version (Golf Ball Fun.au3) and (Golf Ball Fun No Direction Checking .au3). The second one doesn't check what direction it's moving before bouncing. Basically it can get stuck on the edge of things and can make it a little more entertaining. The only difference between the two is on lines 48 and 52. "Golf Ball Fun No Direction Checking .au3" has StringInStr($Xslope, "-") and StringInStr($Yslope, "-") removed. Thats the only difference!

Why did I choose a golf ball? I have no idea ... other than my wallpaper is black so I needed a light colored object.

~ Hallman

Golf_Ball_Fun.au3

Golf_Ball_Fun__No_Direction_Checking_.au3

post-9746-1207176225_thumb.gif

Edited by Hallman

Share this post


Link to post
Share on other sites



That's a really cool script Hallman, I like the one that bounces on windows! :) It's so entertaining! Yay Hallman! What happen to that other script that you never finished? The remote app?

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

That's a really cool script Hallman, I like the one that bounces on windows! :party: It's so entertaining! Yay Hallman! What happen to that other script that you never finished? The remote app?

Thanks :lmao:

I still work on it off and on. Lets just say I take really long breaks. I don't know when I'll finish it, right now it's just a hobby on the side. I'm not an any hurry to finish it :)

@Achilles

lol ... Thats cool when you run it multiple times the balls bounce off of each other ^_^

I ran it 22 times and the old Core 2 Quad was at 90% - 95% CPU usage :)

EDIT:

I didn't add a way to turn it off becuase well, it is supposed to be a joke. That's what task manager is for!

Edited by Hallman

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

You could add this to a HotKey in your script:

HotKeySet("{ESC}", "_Exit")

Func _Exit()
     Do
          Sleep(10)
          ProcessClose("AutoIt3.exe")
     Until ProcessExists("AutoIt3.exe") = 0
EndFunc

Your choice though! :)

Edited by JustinReno

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Or even better ...

Func _Exit()
    Do
        Sleep(10)
        If @Compiled Then 
            ProcessClose(@ScriptName)
        Else
            If @AutoItX64 Then
                ProcessClose("AutoIt3_x64.exe")
            Else
                ProcessClose("AutoIt3.exe")
            EndIf
        EndIf
     Until ProcessExists("AutoIt3.exe") = 0 And ProcessExists("AutoIt3_x64.exe") = 0 And ProcessExists(@ScriptName) = 0
EndFunc

I run 64 bit ...

Now it works for all versions :)

Edited by Hallman

Share this post


Link to post
Share on other sites

Or Even Better:

Func _Exit()
Exit
EndFunc

:)

Share this post


Link to post
Share on other sites

Thats not better.

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

Or Even Better:

Func _Exit()
Exit
EndFunc

:)

lol we would do that, but if you run it multiple times, then that would only close one of them! Edited by Hallman

Share this post


Link to post
Share on other sites

lol we would do that, but if you run it multiple times, then that would only close one of them!

Esc works if you make the golf ball the active window. This is actually somewhat hard to do if the window is tiny and moving fast...

My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

Esc works if you make the golf ball the active window. This is actually somewhat hard to do if the window is tiny and moving fast...

lol yeah thats why I had it close on GUI_EVENT_CLOSE. I told my mom that she had to click it to close it. Kinda mean but it was funny watching her try to click it as it zoomed accross the screen

EDIT: An unforseen problem with the exit function ... It ProcessClose()'s itself before the other ones! An _IsPressed() in the main loop is probably the best choice.

EDIT2: remove the If statement on line 40 and see what happens :) That's why that if statement is there ...

Edited by Hallman

Share this post


Link to post
Share on other sites

Who are you asking this question to? The author who hasn't been on here in 5 years, one of the banned users?

This thread is 7 YEARS OLD


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0