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 coordinates question

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



Joined: 23 Feb 2005
Posts: 4

PostPosted: Wed Feb 23, 2005 4:25 am    Post subject: Mouse coordinates question Reply with quote

Ok, my hands shake a lot (I do mean a lot) so I'm trying to make a script to kind of calm my mouse down so it doesn't go all over the place when I'm navigating around my desktop.

I tried to make a loop so that when I had a certain button held down, the script would GetMousePos and then MouseMove to the position it got. Well, as the experienced among you can imagine, all I got was my mouse hopping all over the place. I put a delay on it of a second.

I think to do this correctly, I may need a loop within a loop, but I'm not sure. Anyone kind enough to give me a workaround or a tip I've missed? I'm considerably new to AutoHotkey.

Thanks tons in advance guys =)

--Sy
Back to top
View user's profile Send private message
jonny



Joined: 13 Nov 2004
Posts: 3004
Location: Minnesota

PostPosted: Wed Feb 23, 2005 4:31 am    Post subject: Reply with quote

This isn't really what you asked for, but it does kind of solve your problem. If you find using a keyboard easier than using a mouse, this script turns the numpad into a mouse, and it's surprisingly easy to use.
Back to top
View user's profile Send private message
symun



Joined: 23 Feb 2005
Posts: 4

PostPosted: Wed Feb 23, 2005 4:37 am    Post subject: Reply with quote

I'm working on the script right now trying to fix it. What I'm basically trying for is something that will return my mouse to a point on my screen on a second to second basis, so instead of _``_~-~-`_~`-_ I get ---------------, working on both the horizontal and vertical axis.

Right now I'm thinking multiple GetMousePos to define variables and if statements to plot the next logcial move of my mouse, then mousemove to level it out.

Thank you though, I will use that script until I figure this out Smile
Back to top
View user's profile Send private message
jonny



Joined: 13 Nov 2004
Posts: 3004
Location: Minnesota

PostPosted: Wed Feb 23, 2005 4:44 am    Post subject: Reply with quote

What's really ironic is that I just started it up too. My wireless ran out of batteries right after I posted, and I forgot to put my other set of triple a's in the charger last night. Thankfully, I have this script in the start menu, so it was just a few keystrokes away. Deguix is saving both of us. Very Happy
Back to top
View user's profile Send private message
symun



Joined: 23 Feb 2005
Posts: 4

PostPosted: Wed Feb 23, 2005 5:29 am    Post subject: Reply with quote

Code:

Loop
{
  MouseGetPos, xp, yp
  Sleep, 10
  BlindMice = %xp%, %yp%
    gosub, LabelHere
  LabelHere::
    MouseMove, %BlindMice%, 80
   gosub, LabelHere
}


This isn't a functioning script, but I've been looking through a ton of other scripts + the online documentation and I can't for the life of me figure out how to define a label within a loop that I can use to loop its self once it's got the variable without resetting the variable with every loop.

Anyone?
Back to top
View user's profile Send private message
Invalid User



Joined: 14 Feb 2005
Posts: 442
Location: Texas, Usa

PostPosted: Wed Feb 23, 2005 5:36 am    Post subject: Reply with quote

I was attemting to goto lables with in loops and blocks myself, and with no success. I find it best not to either. there is always some type of work around though, sometime it just happens to be complitcated and/or a pain
_________________
my lame sig Smile
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
symun



Joined: 23 Feb 2005
Posts: 4

PostPosted: Wed Feb 23, 2005 5:39 am    Post subject: Reply with quote

I got it. I don't know why my brain isn't functioning properly tonight lol.. I have it define it right after the hotkey is activated and then in the primary loop, I have the mousemove.
Back to top
View user's profile Send private message
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