Jump to content
Sign in to follow this  

OK for fun

Recommended Posts

My daughter thought it would be more fun to have it work when the mouse wasn't over it... so I tried it. Sometimes being goofy is fun lol.

;original by:
;post Oct 30 2006, 08:02 PM

;reworked by stampy for mouse over

$x = Run("notepad.exe")

$window = WinGetTitle('')
$window = WinGetHandle($window)

$magnitude = 1
$startpos = WinGetPos($window)


While 1
    $state = WinGetState("Untitled - Notepad", "")
    If $state = 0 Then 
        $WinPos = WinGetPos($window)
        $mousepos = MouseGetPos()
        If $mousepos[0] > $WinPos[0] And $mousepos[0] < $WinPos[0]+$WinPos[2]And $mousepos[1] > $WinPos[1] And $mousepos[1] < $WinPos[1]+$WinPos[3] Then
            WinMove($window, "", $startpos[0], $startpos[1])
            $WinPos[0] = $WinPos[0] + Random($magnitude*-1, $magnitude, 1)
            $WinPos[1] = $WinPos[1] + Random($magnitude*-1, $magnitude, 1)
            WinMove($window, "", $WinPos[0], $WinPos[1])

Share this post

Link to post
Share on other sites

lol this is varry cool... it will be a funny joke ill send to my little sister. its hacker ish....

instead of notepad why not just what ever window is active...

there should be a fun and jokes tab were people can put there funny little scripts

Edited by onedayillpay

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...