Jump to content
Sign in to follow this  
flip209

Catch me If you can...

Recommended Posts

flip209

Opt("TrayIconHide",1)
HotKeySet("{ESC}", "_Exit")

Global $ranx
Global $rany
Global $reversewide = Random(0,1,1)
Global $reverseHieght = Random(0,1,1)

Func _Exit()
    Exit
EndFunc   ;==>_Exit

_rantool()
While 1
    $mouse = MouseGetPos()
    If $mouse[0] < $ranx + 223 And $mouse[0] > $ranx - 30 And $mouse[1] > $rany - 30 And $mouse[1] < $rany + 90 Then
        _rantool()
        Beep(2100, 100)
    EndIf

    Sleep(10)
        
    
    If $ranx > @DesktopWidth - 200 Then $reversewide = 1
    If $ranx < 0 Then $reversewide = 0
    
    If $rany > @DesktopHeight - 55 Then $reverseHieght = 1
    If $rany < 0 Then $reverseHieght = 0
    
    If $reversewide = 1 then $ranx -= 1
    If $reversewide = 0 Then $ranx += 1
    
    If $reverseHieght = 1 then $rany -= 1
    If $reverseHieght = 0 Then $rany += 1
    
    ToolTip("You can not Click on me", $ranx, $rany, "Click here to get rid of me", 3)
WEnd

Func _rantool()
    $ranx = Random(0, @DesktopWidth - 200, 1)
    $rany = Random(0, @DesktopHeight - 200, 1)
    ToolTip("You can not Click on me", $ranx, $rany, "Click here to get rid of me", 3)
    $reverseHieght = Random(0,1,1)
    $reversewide = Random(0,1,1)
EndFunc   ;==>_rantool

Use ESC to exit...

Have fun


" I haven't failed. I've just found 10,000 ways that won't work." Thomas Edison "You cannot help men permanently by doing for them what they could and should do for themselves." Abraham Lincoln

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  

×