 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
fenix
Joined: 16 Sep 2006 Posts: 25
|
Posted: Sun Jul 27, 2008 5:26 pm Post subject: Move curser, then go back to initial pos |
|
|
| Is it possible to make a hotkey that first clicks on a certain mousepos then go back to the initial possision of the curser? |
|
| Back to top |
|
 |
vahju
Joined: 17 Feb 2008 Posts: 97
|
Posted: Sun Jul 27, 2008 5:34 pm Post subject: |
|
|
Look up the following in ahk help:
MouseGetPos
MouseClick |
|
| Back to top |
|
 |
fenix
Joined: 16 Sep 2006 Posts: 25
|
Posted: Sun Sep 07, 2008 12:00 am Post subject: |
|
|
| Havnt been able to figure anything out, can anyone help me out please? |
|
| Back to top |
|
 |
Slanter
Joined: 28 May 2008 Posts: 397 Location: Minnesota, USA
|
Posted: Sun Sep 07, 2008 12:06 am Post subject: |
|
|
| Code: | #x::
CoordMode, Mouse, Screen
MouseGetPos, X, Y
MouseClick,, 50, 50
MouseMove, %X%, %Y%, 0
Return |
 _________________ Unless otherwise stated, all code is untested
(\__/) This is Bunny.
(='.'=) Cut, copy, and paste bunny onto your sig.
(")_(") Help Bunny gain World Domination. |
|
| Back to top |
|
 |
fenix
Joined: 16 Sep 2006 Posts: 25
|
Posted: Sun Sep 07, 2008 12:30 am Post subject: |
|
|
x::
CoordMode, Mouse, Screen
MouseGetPos, X, Y
MouseMove, 853, 992
Click, left
MouseMove, 455, 957
Click, left
return
MouseMove, %X%, %Y%, 0
Return
Thats kinda what I want, I want it to save the initial coordinates.
then click a specfic coordinate, and go back to the inital coordinates. it doesnt seem to work with what I made there. whats wrong?
Thanks in advance ! |
|
| Back to top |
|
 |
Serenity
Joined: 07 Nov 2004 Posts: 1276
|
Posted: Sun Sep 07, 2008 1:12 am Post subject: |
|
|
Try removing the first Return so the last MouseMove can execute:
| Code: | x::
CoordMode, Mouse, Screen
MouseGetPos, X, Y
MouseMove, 853, 992
Click, left
MouseMove, 455, 957
Click, left
return
MouseMove, %X%, %Y%, 0
Return |
_________________ "Anything worth doing is worth doing slowly." - Mae West
 |
|
| Back to top |
|
 |
fenix
Joined: 16 Sep 2006 Posts: 25
|
Posted: Sun Sep 07, 2008 1:23 am Post subject: |
|
|
| Thanks much! |
|
| 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
|