datkewlguy 0 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... Share this post Link to post Share on other sites
this-is-me 6 Posted January 4, 2005 MouseGetPos and MouseMove... Who else would I be? Share this post Link to post Share on other sites
datkewlguy 0 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. Share this post Link to post Share on other sites
this-is-me 6 Posted January 4, 2005 Missing something? ;move right $pos = MouseGetPos() MouseMove($pos[0]+1,$pos[1]) Who else would I be? Share this post Link to post Share on other sites
trids 2 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 Share this post Link to post Share on other sites
datkewlguy 0 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? Share this post Link to post Share on other sites
datkewlguy 0 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... Share this post Link to post Share on other sites
Valik 478 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? Share this post Link to post Share on other sites
datkewlguy 0 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? Share this post Link to post Share on other sites
layer 2 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 Share this post Link to post Share on other sites
datkewlguy 0 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. Share this post Link to post Share on other sites
this-is-me 6 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? Share this post Link to post Share on other sites