Sign in to follow this  
Followers 0
go0b3r

stupid script idea but i still wanna do it

8 posts in this topic

Ok well my cat tends to become transfixed on my computer when the mouse is moveing, He'll even look tot he back of the computer, probably trying to see if its back there. If there a program i can write that will make the mouse move around randomly on the screen, and keep moveing till i press a key to stop it? I work alot so i thought this would keep my cat ammused while im gone lol.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Ok well my cat tends to become transfixed on my computer when the mouse is moveing, He'll even look tot he back of the computer, probably trying to see if its back there. If there a program i can write that will make the mouse move around randomly on the screen, and keep moveing till i press a key to stop it? I work alot so i thought this would keep my cat ammused while im gone lol.

Hi,

maybe something like this will keep your cat smiling. http://www.autoitscript.com/forum/public/style_emoticons/#EMO_DIR#/lmao.gif

; ----------------------------------------------------------------------------
;
; AutoIt Version: 3.1.1 beta
; Author:        Thorsten Meger <Thorsten.Meger
;
; Script Function: Mouse move around
;
; ----------------------------------------------------------------------------

$maxX = 1024
$maxY = 768

HotKeySet("{end}", "end")

While 1
    MouseMove(Random(0, $maxX, 1), Random(0, $maxY, 1))
    sleep(500)
WEnd

Func end()
    exit(0)
EndFunc
So long,

Mega

MouseMoveAround.au3

Edited by Xenobiologist

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

lol ty, but 1 little problem... IT DOESNT" STOP lol. i presed esc with no luck, ive spent the last minute trying to time it just right to press alt+ctrl+delete and lick processes to close autoit.exe lol, im not good with scripts so i dont know what to change to get it to stop, but ty non the less for putting the time in. Lol that was an interesting few minutes.

Share this post


Link to post
Share on other sites

That's odd. Last time I tried it the ESC hotkey worked fine. Do you have any other programs running that would steal the ESC key? Or, did you try to run two AutoIt scripts at once through Scite? I've found the latter doesn't work out so well, but it shouldn't have stopped it from exiting on ESC.

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

changing th.meger's code... you should be able to kill this in 3 seconds:

$maxX = 1024
$maxY = 768

While 1
    MouseMove(Random(0, $maxX, 1), Random(0, $maxY, 1), Random(10, 100, 1))
    MouseMove(Random(0, $maxX, 1), Random(0, $maxY, 1), Random(0, 10, 1))
    MouseMove(Random(0, $maxX, 1), Random(0, $maxY, 1), Random(10, 100, 1))
    Sleep(3000)
WEnd

Edited by herewasplato

[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Check out my MouseSpiral script. It's entertaining (though not random).

http://www.autoitscript.com/forum/index.php?showtopic=20567

I think he means the first script that terminates with end.

You could use macros to get the max X and Y.

 

; ----------------------------------------------------------------------------
;
; AutoIt Version: 3.1.1 beta
; Author:        Thorsten Meger 
;
; Script Function: Mouse move around
;
; ----------------------------------------------------------------------------

HotKeySet("{ESC}", "end")

While 1
    MouseMove(Random(0, @DesktopWidth - 1, 1), Random(0, @DesktopHeight - 1, 1), Random(10, 100, 1))
    sleep(Random(10, 700, 1))
WEnd

Func end()
    exit
EndFunc
Edited by Melba23
Removed email address

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

...You could use macros to get the max X and Y.

Yes, but those macro names are so long that they make the code wrap in the post :-(

@go0b3r,

The HotKey should work for you - it worked for me. Anyway, try this code:

While 1
    MouseMove(Random(0, @DesktopWidth, 1), _
            Random(0, @DesktopHeight, 1), _
            Random(0, 25, 1));<<<mouse move speed
    ToolTip("Kill me now! I'm writing code for cats!")
    MouseMove(Random(0, @DesktopWidth, 1), _
            Random(0, @DesktopHeight, 1), _
            Random(25, 50, 1));<<<mouse move speed
    ToolTip("Kill me now! I'm writing code for cats!")
    MouseMove(Random(0, @DesktopWidth, 1), _
            Random(0, @DesktopHeight, 1), _
            Random(50, 75, 1));<<<mouse move speed
    ToolTip("Kill me now! I'm writing code for cats!")
    MouseMove(Random(0, @DesktopWidth, 1), _
            Random(0, @DesktopHeight, 1), _
            Random(75, 100, 1));<<<mouse move speed
    ToolTip("Kill me now! I'm writing code for cats!")
    MouseMove(Random(0, @DesktopWidth, 1), _
            Random(0, @DesktopHeight, 1), _
            Random(0, 100, 1));<<<mouse move speed
    ToolTip("Paused!!!! Kill Script now...")
    Sleep(4000)
WEnd
Edited by herewasplato

[size="1"][font="Arial"].[u].[/u][/font][/size]

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