 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Guest
|
Posted: Tue Jun 07, 2005 7:48 pm Post subject: I'm New too scripting and would like some help. |
|
|
Here's what I want to do. I want to change LClick and Rclick to my 'z' and 'x' key respectively. Also want to be able to hold it down and it hold down the mouse key. I want this cuz I play a game on a laoptop and remapping the keys would make it more effecient.
Here's what I got.
*z up::MouseClick, left, , , 1, 0, U
*z::
GetKeyState, LButtonState, LButton
if LButtonState = U
MouseClick, left, , , 1, 0, D ;
*x up::MouseClick, right, , , 1, 0, U
*x::
GetKeyState, RButtonState, RButton
if RButtonState = U
MouseClick, right, , , 1, 0, D
return
I read and read and can't seem to figure it out. Anyone got a clue what to do? |
|
| Back to top |
|
 |
Rubberduck
Joined: 24 Apr 2005 Posts: 96
|
Posted: Tue Jun 07, 2005 8:17 pm Post subject: |
|
|
At least I found one possible error:
There is missing a RETURN before the line
| Code: | | *x up::MouseClick, right, , , 1, 0, U |
_________________ Wer keine Antworten hat muss nicht dumm sein,
dumm ist nur der welcher keine Fragen hat. |
|
| Back to top |
|
 |
Decarlo110
Joined: 15 Dec 2004 Posts: 303 Location: United States
|
Posted: Wed Jun 08, 2005 9:20 pm Post subject: |
|
|
Solution:
| Code: |
z::
MouseClick,,,,,, D
KeyWait, z
MouseClick,,,,,, U
return
x::
MouseClick, R,,,,, D
KeyWait x
MouseClick, R,,,,, U
return
|
_________________ 1) The Open Source Definition http://www.opensource.org/docs/definition_plain.php
2) Intuitive. Logical. Versatile. Adaptable. <<AutoHotkey>> |
|
| 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
|