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 

I'm New too scripting and would like some help.

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






PostPosted: Tue Jun 07, 2005 7:48 pm    Post subject: I'm New too scripting and would like some help. Reply with quote

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

PostPosted: Tue Jun 07, 2005 8:17 pm    Post subject: Reply with quote

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
View user's profile Send private message
Decarlo110



Joined: 15 Dec 2004
Posts: 303
Location: United States

PostPosted: Wed Jun 08, 2005 9:20 pm    Post subject: Reply with quote

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