Jump to content

Rotate mouse movement by 90 degrees


Recommended Posts

G'day everyone

Do you think it would be possible in AutoIt to rotate the mouse's movement by 90 degrees? In other words, when the user moves the mouse up/down, the mouse pointer moves left/right, and vice versa.

Thanks

Samuel

Link to post
Share on other sites

Just incase no one comes up with any other much better ideas ^^ heres some terrible code that happens to do the job ;)

local $Store = mousegetpos()
local $Temp, $Temp1

while 1
   sleep(1)
   $pos = mousegetpos()
    $Temp = $pos[0] - $Store[0]
$Temp1 = $pos[1] - $Store[1]


  If $pos[1] < $Store[1] Then ;Up = Right
mousemove($pos[0]-$Temp1 , $pos[1]-$Temp1,0)
   elseIf $pos[1] > $Store[1] Then ;Down = Left
   mousemove($pos[0]-$Temp1 , $pos[1]-$Temp1,0)
  elseIf $pos[0] > $Store[0] Then ;Right = Down
 mousemove($pos[0]-$Temp , $pos[1]+$Temp,0)
  elseif $pos[0] < $Store[0] Then ;Left = Up
 mousemove($pos[0]-$Temp , $pos[1]+$Temp,0)
EndIf
   $Store = mousegetpos() 
   WEnd

Seams the idea didn't work, so i thought i would post the fail incase a. someone can get it to work b. save times for others who had the same bad idea ^^

Each If on their own does work, Making Up > Right, Right >Down, Down > Left and Left > Up problem is when you put them all together you get conflicts ^^

Edited by IanN1990
Link to post
Share on other sites

It would be handy for me.

I use a biggish 16:10 for working in photoshop. It's mechanically easy to rotate from landscape to portrait, but my graphics card software is rather obtuse, and so i rarely make the switch.

In this case, text wouldn't matter, as not used [apart from keyboard shortcuts in PS, which wouldn't be affected] but mouse/tablet cursor movement would.

If no one here comes up with a good solution, I might make this a project...

William

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

    No registered users viewing this page.

×
×
  • Create New...