Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

How to make 2 turbo hotkeys?


  • Please log in to reply
2 replies to this topic
moritsuna
  • Members
  • 2 posts
  • Last active: Jun 28 2011 12:51 PM
  • Joined: 28 Feb 2011
Here's my code which is hotkeyed to turbo X, how do I turbo S as well?

#MaxHotkeysPerInterval 100 
SetKeyDelay [, 1, 250, -1] 
$x:: 
Loop 
{ 
if not GetKeyState("x", "p") 
break 
Send, x 
Sleep 100 
} 
return 

x:


moritsuna
  • Members
  • 2 posts
  • Last active: Jun 28 2011 12:51 PM
  • Joined: 28 Feb 2011
Bump


I got this
#MaxHotkeysPerInterval 100 
SetKeyDelay [, 1, 250, -1] 
$x:: 
Loop 
{ 
if not GetKeyState("x", "p") 
break 
Send, x 
Sleep 100 
} 
return 

x:



#MaxHotkeysPerInterval 100 
SetKeyDelay [, 1, 250, -1] 
$s:: 
Loop 
{ 
if not GetKeyState("s", "p") 
break 
Send, s 
Sleep 100 
} 
return 

s:

But how do I make it so that the S and X key are turbo at the same time???

None
  • Members
  • 3199 posts
  • Last active: Nov 05 2015 09:55 PM
  • Joined: 28 Nov 2009
Ahk can only run one loop at a time so you need to use SetTimer or make them part of a single loop.
$x::

$s::

While GetKeyState("x", "p") || GetKeyState("s", "p")

{

If GetKeyState("x", "p")

 Send, x

If GetKeyState("s", "p")

 Send, s

Sleep 100

}

return