| View previous topic :: View next topic |
| Author |
Message |
symun
Joined: 23 Feb 2005 Posts: 4
|
Posted: Wed Feb 23, 2005 4:25 am Post subject: Mouse coordinates question |
|
|
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 |
|
 |
jonny
Joined: 13 Nov 2004 Posts: 3004 Location: Minnesota
|
Posted: Wed Feb 23, 2005 4:31 am Post subject: |
|
|
| 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 |
|
 |
symun
Joined: 23 Feb 2005 Posts: 4
|
Posted: Wed Feb 23, 2005 4:37 am Post subject: |
|
|
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  |
|
| Back to top |
|
 |
jonny
Joined: 13 Nov 2004 Posts: 3004 Location: Minnesota
|
Posted: Wed Feb 23, 2005 4:44 am Post subject: |
|
|
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.  |
|
| Back to top |
|
 |
symun
Joined: 23 Feb 2005 Posts: 4
|
Posted: Wed Feb 23, 2005 5:29 am Post subject: |
|
|
| 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 |
|
 |
Invalid User
Joined: 14 Feb 2005 Posts: 442 Location: Texas, Usa
|
Posted: Wed Feb 23, 2005 5:36 am Post subject: |
|
|
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  |
|
| Back to top |
|
 |
symun
Joined: 23 Feb 2005 Posts: 4
|
Posted: Wed Feb 23, 2005 5:39 am Post subject: |
|
|
| 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 |
|
 |
|