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 

Need help with simple hotstring

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





PostPosted: Mon Dec 14, 2009 7:17 pm    Post subject: Need help with simple hotstring Reply with quote

Hello all. I'm new to AHK and am having trouble with a rather simple task. I'm trying to map a keystroke that will simulate holding down the left control key and hitting "x" repeatedly.

As somebody with a little experience with programming language, AHK seems pretty straight forward, and from what I can tell this would be a simple single line, but ever which way I've tried isn't working.

If it helps, the goal of this is to level up a character in the game "Mount&Blade" if anybody here plays it. Any and all help would be appreciated, and please bear with my inexperience with the program.
Back to top
Carcophan



Joined: 24 Dec 2008
Posts: 1308
Location: :noitacoL

PostPosted: Mon Dec 14, 2009 8:11 pm    Post subject: Reply with quote

Quote:
but ever which way I've tried isn't working



What have you tried, maybe we can help.
Back to top
View user's profile Send private message
txquestor



Joined: 22 Aug 2009
Posts: 294

PostPosted: Mon Dec 14, 2009 11:43 pm    Post subject: Reply with quote

Try this, TESTED:

Press & Hold LButton & x button
Sends the x repeatedly until buttons are released.

Code:

#Persistent

~LButton & x::
while GetKeyState("LButton", "P")  ; While the LButton key is being held down physically. Send x repeatedly until released
{
    Send x
}
return

ESC::ExitApp


Have Fun, Laughing
_________________

"Man's quest for knowledge is an expanding series whose limit is infinity"
Back to top
View user's profile Send private message
Display posts from previous:   
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