Sign in to follow this  
Followers 0
Worfox

catch the window

30 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites



Funny, i tried to catch window for five minute with my mouse...never sucessfully catch !


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

I win

$mouse = MouseGetPos()
WinSetOnTop("Catch me!","",1)
WinMove("Catch me!","",$mouse[0] - 70,$mouse[1] - 10)

Giggity

Share this post


Link to post
Share on other sites

wow i am the winner, btw: your script is very good. Thanks

Share this post


Link to post
Share on other sites

Only thing I would change, is that when there is no mouse movement, that the center radio be selected.


Giggity

Share this post


Link to post
Share on other sites

$mouse = MouseGetPos()
WinSetOnTop("Catch me!","",1)
WinMove("Catch me!","",$mouse[0] - 70,$mouse[1] - 10)
Lol nice cheat :mellow:

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

I saw nothing in the rules about not moving the window :mellow:. It just says to catch it. So I wouldn't say "cheat", really I wouldn't even say "bent the rules". I just pulled a scorpion. *Flawless Victory*


Giggity

Share this post


Link to post
Share on other sites

^+break "you win!"

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Just hitting escape works too.


Giggity

Share this post


Link to post
Share on other sites

Just hitting escape works too.

I don't think that pressing keys is catching the window, anyway that's just stupid... :mellow:


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
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.


Giggity

Share this post


Link to post
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...


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

I WIN!!

Took me 1 second!

Click on the tray, Pause script :mellow:


code

Share this post


Link to post
Share on other sites

Ha, that is a good one. But how do you resume it to claim your price? (The you win msgbox) *Marks another win for team USA*


Giggity

Share this post


Link to post
Share on other sites

Ha, that is a good one. But how do you resume it to claim your price? (The you win msgbox) *Marks another win for team USA*

ohh :mellow: I didnt know there was a msgbox :( I didnt the msgbox, but still I got the window :) I didnt look at the code

code

Share this post


Link to post
Share on other sites

i just edited the msgbox and hid the tray icon

Share this post


Link to post
Share on other sites

My tool still works, sweet.


Giggity

Share this post


Link to post
Share on other sites

#19 ·  Posted (edited)

My tool still works, sweet.

not really a tool.. Its a bit stupid to cheat at this game.. It shows that you suck at this game.. Edited by ludocus

Share this post


Link to post
Share on other sites

#20 ·  Posted (edited)

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

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