Jump to content
Sign in to follow this  
Splitz

Mousemove 1 pixel

Recommended Posts

Splitz

Hello! I'm looking for a script that will move the mouse exactly 1 pixel to the left, right, up, or down depending on which arrow key is pressed, the mouse will start at its current position where ever its placed on the screen, but once an arrow key is pressed, the mouse should then move 1 pixel in the direction of the arrow key pressed.

Share this post


Link to post
Share on other sites
blackmage999

Are you actualy asking for help or asking us to code something for you? If you need help, lets see what you got so far and we can go from there.

Share this post


Link to post
Share on other sites
somdcomputerguy

You need MouseGetPos, _IsPressed, and MouseMove.


- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites
Splitz

exactly what kind of function would i need to put in to make the mouse move say 1 pixel to the right from its current position?

Mousemove seems a bit confusing to me, i want to make it move in a direction from where the mouse is randomly placed, not a pre-determined spot thats already filled out.

Share this post


Link to post
Share on other sites
sleepydvdr

exactly what kind of function would i need to put in to make the mouse move say 1 pixel to the right from its current position?

Mousemove seems a bit confusing to me, i want to make it move in a direction from where the mouse is randomly placed, not a pre-determined spot thats already filled out.

I thing something like this would work:

$newMousePosition = $currentMousePosition + 1

Feed that into your MouseMove function and you will be all set.


#include <ByteMe.au3>

Share this post


Link to post
Share on other sites
monoscout999

Look what i found..

Share this post


Link to post
Share on other sites
JohnOne

Here is a short example.

;set a hotkey
HotKeySet("{DOWN}","Down") 

;loop to keep script alive
While 1
    Sleep(10)
WEnd

;move the mouse cursor down
Func Down()
    MouseMove(MouseGetPos(0),MouseGetPos(1)+1)
EndFunc

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

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  

×