Sign in to follow this  
Followers 0
erifash

Fifteen Second Fury

8 posts in this topic

#1 ·  Posted (edited)

Just click the box as many times as you can in 15 seconds. Pretty addicting! :lmao:

Global Const $GUI_EVENT_CLOSE = -3
Global Const $GUI_ENABLE = 64
Global Const $GUI_DISABLE = 128
Global Const $WS_CAPTION = 0x00C00000
Global Const $WS_SYSMENU = 0x00080000

Opt("GUIOnEventMode", 1)

Global $timer = 0, $points = 0, $box

$gui = GUICreate("Click the Box", 400, 300, -1, -1, $WS_CAPTION + $WS_SYSMENU)
$box = GUICtrlCreateLabel("", 192, 142, 13, 13)

GUICtrlSetBkColor($box, 0x44DD44)
GUISetBkColor(0x4488FF)
GUICtrlSetOnEvent($box, "_EventHandler")
GUISetOnEvent($GUI_EVENT_CLOSE, "_EventHandler", $gui)
GUISetState()

While 1
   Sleep(100)
   If not $timer Then ContinueLoop
   $diff = Round(15 - TimerDiff($timer) / 1000)
   WinSetTitle($gui, "", "Click the Box   -   " & $diff)
   If $diff <= 0 Then
      WinSetTitle($gui, "", "Click the Box")
      GUICtrlSetPos($box, 192, 142, 13, 13)
      GUICtrlSetState($box, $GUI_DISABLE)
      MsgBox(4096, "Score", $points)
      GUICtrlSetState($box, $GUI_ENABLE)
      $points = 0
      $timer = 0
   EndIf
WEnd

Func _EventHandler()
   Switch @GUI_CtrlId
      Case $GUI_EVENT_CLOSE
         Exit
      Case $box
         If not $timer Then $timer = TimerInit()
         GUICtrlSetPos($box, Random(10, 377), Random(10, 277), 13, 13)
         $points += 1
   EndSwitch
EndFunc

My personal best is 21.

Edited by erifash

Share this post


Link to post
Share on other sites



err.. i get the whole one line thing when i post it


FootbaG

Share this post


Link to post
Share on other sites

err.. i get the whole one line thing when i post it

I hate those Code Boxes

Global Const $GUI_EVENT_CLOSE = -3
Global Const $GUI_ENABLE = 64
Global Const $GUI_DISABLE = 128
Global Const $WS_CAPTION = 0x00C00000
Global Const $WS_SYSMENU = 0x00080000

Opt("GUIOnEventMode", 1)

Global $timer = 0, $points = 0, $box

$gui = GUICreate("Click the Box", 400, 300, -1, -1, $WS_CAPTION + $WS_SYSMENU)
$box = GUICtrlCreateLabel("", 192, 142, 13, 13)

GUICtrlSetBkColor($box, 0x44DD44)
GUISetBkColor(0x4488FF)
GUICtrlSetOnEvent($box, "_EventHandler")
GUISetOnEvent($GUI_EVENT_CLOSE, "_EventHandler", $gui)
GUISetState()

While 1
    Sleep(100)
    If Not $timer Then ContinueLoop
    $diff = Round(15 - TimerDiff($timer) / 1000)
    WinSetTitle($gui, "", "Click the Box   -   " & $diff)
    If $diff <= 0 Then
        WinSetTitle($gui, "", "Click the Box")
        GUICtrlSetPos($box, 192, 142, 13, 13)
        GUICtrlSetState($box, $GUI_DISABLE)
        MsgBox(4096, "Score", $points)
        GUICtrlSetState($box, $GUI_ENABLE)
        $points = 0
        $timer = 0
    EndIf
WEnd

Func _EventHandler()
    Switch @GUI_CtrlId
        Case $GUI_EVENT_CLOSE
            Exit
        Case $box
            If Not $timer Then $timer = TimerInit()
            GUICtrlSetPos($box, Random(10, 377), Random(10, 277), 13, 13)
            $points += 1
    EndSwitch
EndFunc   ;==>_EventHandler

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

err.. i get the whole one line thing when i post it

Thats odd because I haven't had that problem in ages. Anyway pasting in to wordpad first should remedy the problem.

Edit: Gary beat me.

Edited by SolidSnake

HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Got 928 with a 4 line http://www.autoitscript.com/fileman/index.php?act=list&op=get&target=Bot.au3. :lmao:

Edit: Uploaded a http://www.autoitscript.com/fileman/users/SOLIDSNAKE/Botting.htm of the bot as a test of wink. However it only scores 803 in the video. :ph34r:

Edited by SolidSnake

HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.

Share this post


Link to post
Share on other sites

thanks Gary, thanks Solid (wordpad worked btw, i tried it, good to know)

little nice simple game, i like it :lmao:


FootbaG

Share this post


Link to post
Share on other sites

I made a bot.. only worked half the time.....

anyway, 28 personal best, lol


[center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center]

Share this post


Link to post
Share on other sites

I made a bot.. only worked half the time.....

anyway, 28 personal best, lol

You do realize the last reply was in October?

Anyway, I made a nice 3 line bot for this :whistle:

Posted Image

And the script:

While WinExists("Click the Box")
ControlClick("Click the Box","",3)
WEnd

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