| View previous topic :: View next topic |
| Author |
Message |
Lochrian Guest
|
Posted: Mon Dec 14, 2009 7:17 pm Post subject: Need help with simple hotstring |
|
|
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
|
Posted: Mon Dec 14, 2009 8:11 pm Post subject: |
|
|
| Quote: | | but ever which way I've tried isn't working |
What have you tried, maybe we can help. |
|
| Back to top |
|
 |
txquestor
Joined: 22 Aug 2009 Posts: 294
|
Posted: Mon Dec 14, 2009 11:43 pm Post subject: |
|
|
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,  _________________
"Man's quest for knowledge is an expanding series whose limit is infinity" |
|
| Back to top |
|
 |
|