Muhammad Azhar
Muhammad Azhar

Reputation: 11

Is it possible to use two keys , either one to execute a function in AutoHotKey (AHK) script

i am trying a script for a game , click "E" or Shift+E (shift -> while running). How do i use "OR" in AHK ?

e OR +e::
{
Send, E
Sleep, 50
Send, E
Sleep, 50
Send, F
}
return

Upvotes: 0

Views: 1649

Answers (1)

Yane
Yane

Reputation: 837

$e:: 
$+e:: 
Send, E 
Sleep, 50 
Send, E 
Sleep, 50 
Send, F  
return

The $ prevents the Send, E to trigger the hotkey again.

Also check this link Autohotkey multiple hotkeys mapping to the same function

Upvotes: 0

Related Questions