CoderDunn Posted April 2, 2008 Share Posted April 2, 2008 (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 Edited April 2, 2008 by Hallman Link to comment Share on other sites More sharing options...
Swift Posted April 2, 2008 Share Posted April 2, 2008 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? Link to comment Share on other sites More sharing options...
Achilles Posted April 2, 2008 Share Posted April 2, 2008 I started like 7 of these on my desktop... It slowed down my computer a lot... My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list] Link to comment Share on other sites More sharing options...
CoderDunn Posted April 3, 2008 Author Share Posted April 3, 2008 (edited) 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?Thanks 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 @Achilleslol ... 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 April 3, 2008 by Hallman Link to comment Share on other sites More sharing options...
JustinReno Posted April 3, 2008 Share Posted April 3, 2008 (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 April 3, 2008 by JustinReno Link to comment Share on other sites More sharing options...
CoderDunn Posted April 3, 2008 Author Share Posted April 3, 2008 (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 April 3, 2008 by Hallman Link to comment Share on other sites More sharing options...
Swift Posted April 3, 2008 Share Posted April 3, 2008 Or Even Better: Func _Exit() Exit EndFunc Link to comment Share on other sites More sharing options...
JustinReno Posted April 3, 2008 Share Posted April 3, 2008 Thats not better. Link to comment Share on other sites More sharing options...
CoderDunn Posted April 3, 2008 Author Share Posted April 3, 2008 (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 April 3, 2008 by Hallman Link to comment Share on other sites More sharing options...
Achilles Posted April 3, 2008 Share Posted April 3, 2008 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] Link to comment Share on other sites More sharing options...
CoderDunn Posted April 3, 2008 Author Share Posted April 3, 2008 (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 screenEDIT: 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 April 3, 2008 by Hallman Link to comment Share on other sites More sharing options...
BrewManNH Posted April 24, 2015 Share Posted April 24, 2015 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 GudeHow 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 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now