 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Andy9775 Guest
|
Posted: Sat Mar 20, 2010 8:21 am Post subject: Mouse stay |
|
|
| I downloaded AH and I can seem to find a solution to a minor problem. Is it possible to have the mouse stay at the position after running a key? The issue Im having is if the mouse starts at the bottom left and the HK is set to click someing top right, when I move the mouse it returns to the old, bottom left position, can I make it stay and move from where the HK called the mouse to click/run? |
|
| Back to top |
|
 |
MasterFocus
Joined: 08 Apr 2009 Posts: 3035 Location: Rio de Janeiro - RJ - Brasil
|
Posted: Sat Mar 20, 2010 6:06 pm Post subject: |
|
|
Show your code so it's easier to help you.
(use code tags) _________________ "Read the manual. Read it again. Search the forum.
Try something before asking. Show what you've tried."
Antonio França
My stuff: Google Profile |
|
| Back to top |
|
 |
andy9775 Guest
|
Posted: Sun Mar 21, 2010 9:08 pm Post subject: |
|
|
| Code: | ^q::
click ,l,795,53
return
|
|
|
| Back to top |
|
 |
a_h_k
Joined: 02 Feb 2008 Posts: 626
|
Posted: Mon Mar 22, 2010 12:13 am Post subject: |
|
|
You might have to also Move the Mouse there...
| Code: | ^q::
MouseMove, (X:=795), (Y:=53), 0
Click, L, X, Y
Return
|
|
|
| Back to top |
|
 |
andy9775 Guest
|
Posted: Mon Mar 22, 2010 12:59 am Post subject: |
|
|
| a_h_k wrote: | You might have to also Move the Mouse there...
| Code: | ^q::
MouseMove, (X:=795), (Y:=53), 0
Click, L, X, Y
Return
|
|
The mouse pointer already does move to that location. Then it stays, but when I go to move the mouse with my hand it returns to the last location rather then, moving from 795,53. Not the biggest issue, just an annoyance thought it could be fixed/done with a different code. |
|
| Back to top |
|
 |
a_h_k
Joined: 02 Feb 2008 Posts: 626
|
Posted: Mon Mar 22, 2010 1:27 am Post subject: |
|
|
Not sure why that happens .. it doesn't on my pc. What app & OS are you using?
You could try this workaround...
| Code: | ^q::
Click, L, (X:=795), (Y:=53)
Loop {
MouseGetPos, X2, Y2
If (X2!=X and Y2!=Y)
{
Sleep, 1000 ;Gives time for (?) to move mouse back to original location (reduce this value to the minimum required)
MouseMove, X, Y, 0 ;Move mouse BACK to the new desired location (that Click'ed on)
Return
}
Sleep, 100
}
Return |
|
|
| Back to top |
|
 |
andy9775 Guest
|
Posted: Mon Mar 22, 2010 2:22 am Post subject: |
|
|
| Im using win 7 and it does it in all programs. Thanks anyway for the help. |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|