Josbe Posted March 15, 2005 Share Posted March 15, 2005 (edited) Ball bounceJust a small example. Physics law.Part of this algorithm, based from a flashguru.co.uk site, and I tried convert it to AutoIt using the GUI features.As we know, AutoIt is focused to Window's tasks, but I like experiment with graphics. EDIT: I forgot to mention, try to drag the ball to look the behavior, too.Ball_bounce.zip Edited March 15, 2005 by josbe AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta Link to comment Share on other sites More sharing options...
zcoacoaz Posted March 15, 2005 Share Posted March 15, 2005 (edited) Awesome . edit: you might want to turn the ball into a seperate window that is transparent that way it doesn't flicker so much. Edited March 15, 2005 by Xenogis [font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font] Link to comment Share on other sites More sharing options...
steveR Posted March 15, 2005 Share Posted March 15, 2005 Hey pretty nifty. Let the games begin! AutoIt3 online docs Use it... Know it... Live it...MSDN libraryglobal Help and SupportWindows: Just another pane in the glass. Link to comment Share on other sites More sharing options...
Radsam Posted March 15, 2005 Share Posted March 15, 2005 Neat-o Link to comment Share on other sites More sharing options...
CyberSlug Posted March 15, 2005 Share Posted March 15, 2005 Hey, that reminds me ofhttp://www.spikything.plus.com/games/kickups/Perhaps a modification could be made Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
Insolence Posted March 15, 2005 Share Posted March 15, 2005 Already giving my shot at turning this into pong "I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar. Link to comment Share on other sites More sharing options...
killaz219 Posted March 15, 2005 Share Posted March 15, 2005 It would be cool to be able to change the gravity while in the app, and not by going into the source Link to comment Share on other sites More sharing options...
Alterego Posted March 15, 2005 Share Posted March 15, 2005 this is awesome. like whoa... This dynamic web page is powered by AutoIt 3. Link to comment Share on other sites More sharing options...
Josbe Posted March 16, 2005 Author Share Posted March 16, 2005 Hey, that reminds me ofhttp://www.spikything.plus.com/games/kickups/Perhaps a modification could be made <{POST_SNAPBACK}>eh..yeah. You're right. AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta Link to comment Share on other sites More sharing options...
igmeou Posted March 16, 2005 Share Posted March 16, 2005 Hey, that reminds me ofhttp://www.spikything.plus.com/games/kickups/Perhaps a modification could be madeHa ha. I got a highscore of 44 By the way your code is sooo cool in my point of view. I hope autoIt can development some algorithm like yours in the future.This cool thing may attract more users to use and learn AutoIt. Maybe can include in the advance GUI examples in the next release [font="Arial"]Thanks[/font]If @error = me Then $sorry Else Do $clarifyMe Until $meClear EndIF MsgBox(0,"Special Message!","Special Thanks to " & $allHadReplied,$Forever) Link to comment Share on other sites More sharing options...
this-is-me Posted March 23, 2005 Share Posted March 23, 2005 (edited) Autoitscript (me) is lucky # 13 using this script at screen size 1280x1024hotkeyset("{esc}", "stop") while 1 $ret = PixelSearch(332, 300, 930, 604, 0x000000, 0, 7) if not @error then mouseclick("left", $ret[0], $ret[1], 1, 1) endif wend func stop() exit endfuncTo verify this info go to the game page, click the ball once and submit your score. Plug in a bogus name, and look at what name is #13. Edited March 23, 2005 by this-is-me Who else would I be? Link to comment Share on other sites More sharing options...
CyberSlug Posted March 23, 2005 Share Posted March 23, 2005 Autoitscript (me) is lucky # 13 using this script at screen size 1280x1024<{POST_SNAPBACK}>You made my day Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
layer Posted March 23, 2005 Share Posted March 23, 2005 damnit man... thats crazy, didnt think something like that was possible with autoit i havent really touched physics in school yet though soo... FootbaG Link to comment Share on other sites More sharing options...
this-is-me Posted March 23, 2005 Share Posted March 23, 2005 It was just a fun script I hacked together in about 10 minutes and let it run for about 15 before it finally let the ball drop. If I let it run longer, I am sure it would have gone to the top and been the unbeatble score. Just think of it. Autoitscript could have beaten an elite group of hackers from www.eliteunited.de! In underage terms, "autoit pwns 1337 haxorz 2!!!111one!!!" Who else would I be? Link to comment Share on other sites More sharing options...
steveR Posted March 23, 2005 Share Posted March 23, 2005 Thats so great. I am humbled by your uber-leetness. AutoIt3 online docs Use it... Know it... Live it...MSDN libraryglobal Help and SupportWindows: Just another pane in the glass. Link to comment Share on other sites More sharing options...
steveR Posted March 23, 2005 Share Posted March 23, 2005 (edited) I was experimenting with tracking moving pixels. Here is an early test with the game Curveball at http://allthingsflash.com/ag/cb/. I'm still trying more tests to make it work better. I'm sure there are some better search algorithms floating out there.Edit: It seems to only work right when the browser is maximized. Something to do witht he cood mode. Using 1024x768 res.Edit: Slight improvment modificationopt("winTitleMatchMode", 2) opt("pixelCoordMode", 0) hotkeyset("{esc}", "_stop") winWaitActive("flash games") while 1 $pos = _pixelTrack() if not isArray($pos) then mouseMove(510, 485, 0) else mouseMove($pos[0], $pos[1], 0) endIf sleep(1) wEnd func _pixelTrack() for $offset = 10 to 150 step 10 $curPos = mouseGetPos() $boxLeft = $curPos[0] - $offset $boxTop = $curPos[1] - $offset $boxRight = $curPos[0] + $offset $boxBottom = $curPos[1] + $offset $color = 0xC6FFBD $shade = 10 $precision = 8 $box = pixelSearch_ ($boxLeft, $boxTop, $boxRight, $boxBottom, $color, $shade, $precision) if not @error then return $box next endFunc func _stop() exit endFuncIt is only able to get to lvl 8 or so, before it becomes too fast (on my slow comp anyway). That is about how far I can get without using the script.I'm trying to find a faster search algorithm that doesn't require a math degree to understand. Edited March 23, 2005 by steveR AutoIt3 online docs Use it... Know it... Live it...MSDN libraryglobal Help and SupportWindows: Just another pane in the glass. Link to comment Share on other sites More sharing options...
layer Posted March 23, 2005 Share Posted March 23, 2005 lucky 52! http://www.spikything.plus.com/games/kickups/but this is the morning now... and i have to go to school so i eneded it early, when i get home im gonna be #1, you'll see :D FootbaG Link to comment Share on other sites More sharing options...
this-is-me Posted March 23, 2005 Share Posted March 23, 2005 Don't forget to play with the ball a little before running the script. If not, you risk having your score thrown out. Who else would I be? Link to comment Share on other sites More sharing options...
CyberSlug Posted March 23, 2005 Share Posted March 23, 2005 (edited) Thread hijack in progress Inspired by this-is-me's post.... but don't cheat or anything 0) Download attached swf file. 1) Drag the file into an Internet Explorer window. 2) Right click the black window, and choose Play. Optionally resize window. 3) Run following script which asks you to choose the top-left and bottom-right corners; I recommend clicking BELOW the logo in the upper corner..... 4) Watch script; press Esc to quit. expandcollapse popupHotKeySet("{Pause}", "TogglePause") Global $PAUSED = 0 Opt("MouseCoordMode", 1) Dim $top_x, $top_y, $bottom_x, $bottom_y $GUI = GuiCreate("GetCoords...") ToolTip("Click the top-left corner of the window.") While 1 $mouse = GUIGetCursorInfo($GUI) If $mouse[2] Then $pos = MouseGetPos() $top_x = $pos[0] $top_y = $pos[1] ExitLoop EndIf WEnd ToolTip('') Sleep(500) ToolTip("Click the bottom-right corner of the window.") While 1 $mouse = GUIGetCursorInfo($GUI) If $mouse[2] Then $pos = MouseGetPos() $bottom_x = $pos[0] $bottom_y = $pos[1] ExitLoop EndIf WEnd ToolTip("Press Esc to quit...", 0, 0) hotkeyset("{esc}", "stop") func stop() exit endfunc while 1 $ret = PixelSearch($top_x, $top_y, $bottom_x, $bottom_y, 0x000000, 0, 7) if not @error then mouseclick("left", $ret[0], $ret[1], 1, 1) wend Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc Edit: Added Pause hotkey.kickups6.zip Edited March 23, 2005 by CyberSlug Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
layer Posted March 23, 2005 Share Posted March 23, 2005 for some reason, the game always catches me hehe... even if I move the mouse or click it every once in a while, its like, "Sorry, no unfairly achieved scores" ! FootbaG 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