Jump to content

Recommended Posts

Posted

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

Posted (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 :idiot:

Edit: spelling etc.

Edited by trids
Posted

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?

Posted

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?

Posted

.... just use corrdinates... like this...

MouseMove (0, 0)
MouseMove (525, 400)

now you feel the idiot in yourslef coming in? :idiot: jk

FootbaG
Posted

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.

Posted (edited)

Try minus.

This should help:

| y
    |
    |
--------- x
    |
    |
    |
Edited by this-is-me
Who else would I be?

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...