AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Mouse reverseing.

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
df



Joined: 30 Jul 2005
Posts: 13

PostPosted: Thu Aug 11, 2005 7:11 pm    Post subject: Mouse reverseing. Reply with quote

Can AHK reverse the mouse action? ie you move mouse up and cursor goes down, this is not for a useful project but it is for a good wind up!! Smile
Any ideas of code required?
Ta.
Back to top
View user's profile Send private message
Robert Carnegie



Joined: 01 Jun 2005
Posts: 53
Location: Scotland

PostPosted: Fri Aug 12, 2005 12:39 am    Post subject: Reply with quote

One approach would be a loop that repeatedly reads the mouse pointer coordinates, computes where they are relative to the previous mouse coordinates, and performs a MouseMove in the opposite direction. So the mouse does move left/up but then it immediately gets moved to the same distance right/down from where it started. Now running into the edge of the screen could be tricky... do you have to read the screen size?

There is a possible practical application - on Windows Tablet PC, which is a pen-sensitive screen that can be toggled to portrait or landscape display of Windows XP, some software (The Gimp was named) doesn't recognise the rotation. So a program that converts coordinates by rotating them 90 degrees away from normal might be useful. A bit of a catch is precisely that the Tablet PC picks up the absolute location of the pen, so the "real" location would be regularly fed back in - the "real" location which other software misunderstands because of the screen rotation.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group