Jump to content

catch the window


Worfox
 Share

Recommended Posts

mini game: Catch the window

the rules: catch the window :mellow:

please post how you cought it

#NoTrayIcon
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
HotKeySet("^{END}", "END")
$gui = GUICreate("Catch me!", 72, 53, 193, 125, -1, $WS_EX_TOOLWINDOW)
$up = GUICtrlCreateRadio("", 31, 2, 16, 17)
$down  = GUICtrlCreateRadio("", 31, 34, 16, 17)
$left = GUICtrlCreateRadio("", 8, 18, 16, 17)
$right = GUICtrlCreateRadio("", 52, 18, 16, 17)
GUICtrlCreateRadio("", 31, 18, 16, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
MouseMove(@DesktopWidth - 200, @DesktopHeight - 200)
$Mposold = MouseGetPos()
GUISetState()
While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
    $Mpos = MouseGetPos()
    If $Mpos[1] <> $Mposold[1] Or $Mpos[0] <> $Mposold[0] Then
        $winpos = WinGetPos($gui) 
        if  ($winpos[0] < $Mpos[0] And $winpos[1] < $Mpos[1]) and ($Mpos[0] < $winpos[0] + 78 And $Mpos[1] < $winpos[1] + 77) Then
            MsgBox(0, "", "YOU WIN :D")
        EndIf       
        If $Mpos[0] > $Mposold[0] Then
            GUICtrlSetState($right, $GUI_CHECKED)
            WinMove($gui, "", $winpos[0] + ($Mpos[0] - $Mposold[0]), $winpos[1])
        ElseIf $Mpos[0] < $Mposold[0] Then
            GUICtrlSetState($left, $GUI_CHECKED)
            WinMove($gui, "", $winpos[0] - ($Mposold[0] - $Mpos[0]), $winpos[1])
        ElseIf $Mpos[1] < $Mposold[1] Then
            GUICtrlSetState($up, $GUI_CHECKED)
            WinMove($gui, "", $winpos[0], $winpos[1] - ($Mposold[1] - $Mpos[1]))            
        ElseIf $Mpos[1] > $Mposold[1] Then
            GUICtrlSetState($down, $GUI_CHECKED)
            WinMove($gui, "", $winpos[0], $winpos[1] + ($Mpos[1] - $Mposold[1]))
        EndIf
        $Mposold = MouseGetPos()        
    EndIf       
WEnd
Func End()
    Exit
EndFunc  ;==>End
Edited by Worfox
Link to comment
Share on other sites

Yeah, I got it...without cheating. Sure at first I did the old Alt+f4 and got a YOU WIN :mellow:, but I was actually able to "catch it" with my Dual Display setup and using my Crappy Lenovo's Trackpoint.

Spoiler

Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX Builder
Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retreive SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array
Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc
Cool Stuff: AutoItObject UDF â—Š Extract Icon From Proc â—Š GuiCtrlFontRotate â—Š Hex Edit Funcs â—Š Run binary â—Š Service_UDF

 

Link to comment
Share on other sites

Well I did catch it :mellow:. To get the msgbox that you won, though is easier then actually winning. Unless you run my script to win. Just cause I'm American doesn't mean I'm stupid, just like cause your french doesn't mean you don't know how to win.

yep that's right if the game is in autoit why shouldn't we use autoit for win or make tools...

Link to comment
Share on other sites

Well lets take a look at the script. If you move your mouse up 1, the window moves up 1. You move your mouse left 1, the window moves 1. So he intended for us to never be able to catch the box. The only way to win is to cheat as you say. Which I saw nothing in the rules about making a script to move the window. I don't know what all this aggression is for but if there is someone from a country that has won a war other then it's own civil war that has an issue with how I beat the game I'd like to hear it. My bet is people from those countries know how to use the rules in their advantage. I don't like to be a dick, but come on. The first post says to catch the box and post how you did it. So I did. If he didn't like the way I did it, when he updated the script my script would no longer work. End of question.

Edit: Catch it now

#NoTrayIcon
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
HotKeySet("^{END}", "END")
$gui = GUICreate("Catch me!", 72, 53, 193, 125, -1, $WS_EX_TOOLWINDOW)
$up = GUICtrlCreateRadio("", 31, 2, 16, 17)
$down  = GUICtrlCreateRadio("", 31, 34, 16, 17)
$left = GUICtrlCreateRadio("", 8, 18, 16, 17)
$right = GUICtrlCreateRadio("", 52, 18, 16, 17)
GUICtrlCreateRadio("", 31, 18, 16, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
MouseMove(@DesktopWidth - 200, @DesktopHeight - 200)
GUISetState()
While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
        
    MsgBox(0, "", "YOU WIN :D")
            Exit
    EndSwitch
    $Mpos = MouseGetPos()
    WinMove($gui, "", $mpos[0] - 100, $mpos[1] + 100)
           
WEnd
Func End()
    Exit
EndFunc ;==>End
Edited by youknowwho4eva

Giggity

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...