datkewlguy Posted January 4, 2005 Share Posted January 4, 2005 hey just wondering, how could i write a script that would get the mouse position and move it slightly in one direction specified? Not to a new set position just higher lower or left and right... Also, anyway to set up the hotkeys so that the left key would move the mouse left, right right etc... Link to comment Share on other sites More sharing options...
this-is-me Posted January 4, 2005 Share Posted January 4, 2005 MouseGetPos and MouseMove... Who else would I be? Link to comment Share on other sites More sharing options...
datkewlguy Posted January 4, 2005 Author Share Posted January 4, 2005 i know but thats only good for moving to one spot, i just wanna move the mouse in a direction not knowing exactly where to. Link to comment Share on other sites More sharing options...
this-is-me Posted January 4, 2005 Share Posted January 4, 2005 Missing something? ;move right $pos = MouseGetPos() MouseMove($pos[0]+1,$pos[1]) Who else would I be? Link to comment Share on other sites More sharing options...
trids Posted January 5, 2005 Share Posted January 5, 2005 (edited) I would do something like this ..set $nXoffset to +1 or -1 depending on which arrow key is pressed (left or right).set $nYoffset to +1 or -1 depending on which arrow key is pressed (up or down).After setting the offsets, call a UDF that applies both offsets with a MouseMove.The UDF should also set both offsets to 0 before it returns.HTH Edit: spelling etc. Edited January 5, 2005 by trids Link to comment Share on other sites More sharing options...
datkewlguy Posted January 5, 2005 Author Share Posted January 5, 2005 hey thx, but now im setting the diagnal motions (northeast, northwest, southeast, southwest), how do i do that? if Func s() $pos = MouseGetPos() MouseMove($pos[0], $pos[1] + $sp, 1) EndFunc is down, then how do i do diagnals? Link to comment Share on other sites More sharing options...
datkewlguy Posted January 6, 2005 Author Share Posted January 6, 2005 uh that mean no one knows or its impossible? i gotta find out how to set the mouse to move into a diagnal position... Link to comment Share on other sites More sharing options...
Valik Posted January 6, 2005 Share Posted January 6, 2005 You're going to feel like such an idiot when you realize the answer to this... What happens when the mouse moves, say, south-west? What directions does it move in? Link to comment Share on other sites More sharing options...
datkewlguy Posted January 6, 2005 Author Share Posted January 6, 2005 gah i am an idiot yes, ive been doing this for a couple days now, but i see what you're saying ( i think ) and it didnt work, can you give me a code? Link to comment Share on other sites More sharing options...
layer Posted January 6, 2005 Share Posted January 6, 2005 .... just use corrdinates... like this... MouseMove (0, 0) MouseMove (525, 400) now you feel the idiot in yourslef coming in? jk FootbaG Link to comment Share on other sites More sharing options...
datkewlguy Posted January 6, 2005 Author Share Posted January 6, 2005 no no no, it cant be coordinates, i have the system down, basically i thought you just do + the variable from right and up to make northeast, but that makes southwest, im trying to be able to control the moues with arrow keys and everything works except diagnals. no its not even so much about having them i just want them so i dont feel so stupid lol. Link to comment Share on other sites More sharing options...
this-is-me Posted January 6, 2005 Share Posted January 6, 2005 (edited) Try minus. This should help: | y | | --------- x | | | Edited January 6, 2005 by this-is-me Who else would I be? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now