Jump to content

Mouse jiggler


Yar
 Share

Recommended Posts

If I make a script that causes my mouse to be moved one pixel to the left, and then back one pixel to the right, will my screen saver still turn on? What I mean, is because the AutoIt script is a background process, will it still keep the comp from falling asleep?

Link to comment
Share on other sites

Mouse movements are not "background processes". A mouse movement without AutoIt is the same as moving it yourself.

IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font]
Link to comment
Share on other sites

I hate to ask this, but I couldn't find information in the guide. How would I go about doing just that? Move the pointer one pixel to the left, and then one to the right (in a loop)? Sorry if that's spam on this forum.

Link to comment
Share on other sites

If you havent yet download scite and use its help file its much easier.

While 1

$pos = MouseGetPos ()

MouseMove ($pos[0], $pos[1] + 10, 0)

Sleep (10)

MouseMove ($pos[0], $pos[1], 0)

Sleep (10)

WEnd

That moves it up and down, but it should do what you want.
Link to comment
Share on other sites

This will work =) Enjoy! :)

;Written By: John Harris (Inline853)
;Run in AutoItv3

Global $x = 0 ;<== Set the X Coordinate of where your mouse should be
Global $y = 0 ;<== Set the Y Coordinate of where your mouse should be
HotKeySet("{f10}", "end") ;<== This sets F10 as the Hotkey to Exit the Program. When Preseed it will begin Function end.

While 1 ;<== Starts the Loop to continue Function Horizontal (or Vertical)
horizontal() ;<== Sets which Function to Loop. Change to vertical() for the mouse to move vertical
Wend ;<== Goes to top of the Loop

Func horizontal() ;<== Begins the Function horizontal
MouseMove($x+1, $y) ;<== Moves the Mouse 1 pixel to the right
sleep(10000) ;<== Waits 10000ms(10 seconds). Change to any amount of time.
MouseMove($x-1, $y) ;<== Moves the Mouse 1 Pixel to the Left
EndFunc ;<== Ends the horizontal Function

Func vertical() ;<== Begins the Function vertical
MouseMove($x, $y+1) ;<== Moves the Mouse 1 pixel up
sleep(10000) ;<== Waits 10000ms(10 seconds). Change to any amount of time.
MouseMove($x, $y-1) ;<== Moves the Mouse 1 Pixel down
EndFunc ;<== Ends the vertical Function

Func end() ;<== Begins the Function end.
SplashTextOn("", "Ending Program ...", 200,30) ;<== Displays a Splash Text for 2 Seconds
Sleep(2000) ;<== Waits 2000ms (2 seconds). Change to any amount of time.
Exit    ;<== Exits the Program
EndFunc ;<== Ends the Function Exit

MoveMouse.au3

Link to comment
Share on other sites

Woah. Thanks for the code. I've been messing with the other one so it doesn't go flying every which way lol. I think I'll learn more of this ^^ Might be nice to know something more than Java ><

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...