Tutorial: AutoHotkey
Appearance
File:Tutorial icon.png This article is a tutorial for using AutoHotkey with EECH.
Before you start

To check which game devices are known by the system, open Game Devices:
Start>Settings>Control Panel>Game Devices
Let's assume to have 2 devices in Game Devices:
- 1 generic joystick with 4 buttons (referred to as "joystick")
- 1 gamepad with 4 buttons (referred to as "gamepad")
And assume to decide these things to happen:
- joystick:
- button 1: stable hover hold
- button 2: toggle laser
- gamepad:
- button 1: toggle radar jammer
Assigning buttons
1. Open notepad
Start>Run...>notepad
First, to assign a "h" keypress to button 1 on the joystick.
2. Add the following lines:
Joy1:: Send +h return
- Notes:
Joy1represents the first joystick button.::starts the definition.Sendrepresents 'send a keypress'.+represents the shift key (^represents the ctrl key and!represents the alt key).- A
returnseparates the buttons in a config file.
More "hotkeys" (script codes) can be found here. More key codes can be found here.
3. Next is to toggle the laser with the second button on the joystick.
Joy2::
Send {NumpadMult}
return
- Notes:
{NumpadMult}represents the numpad's asterisk.
4. Next is toggle the radar jammer with a button on the gamepad.
2Joy1:: Send j return
- Notes:
- The prefix
2refers to the joystick number. There's no need to prefix the lead device.1Joy1::=Joy1::
- The prefix
5. The complete script should look like this:
Joy1::
Send +h
return
Joy2::
Send {NumpadMult}
return
2Joy1::
Send j
return
6. Save the file to your desktop as EECH.ahk.
7. Run the file.
8. Launch EECH.
See also
External links
More tutorials:
- at the official Wiki of AutoHotkey
- at the main website of AutoHotkey
