Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
- #Warn ; Enable warnings to assist with detecting common errors.
- #UseHook On ; Keyboard hook
- #SingleInstance force
- SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
- SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
- ;#IfWinActive The Operational Art of War
- ;#IfWinActive ahk_exe Opart 4.exe
- #If WinActive("ahk_class The Operational Art of War") and WinActive("ahk_exe Opart 4.exe")
- ; Suspend: Pause
- Pause::Suspend
- ;WASD keys
- w::Up
- a::Left
- s::Down
- d::Right
- ; Other remappings
- +w:: ; Shift+W - Weather Report
- Send w
- Return
- +a:: ;Shift+A - Air Unit Report
- Send a
- Return
- ^a:: ;Ctrl+A - Air Briefing
- Send +a
- Return
- +d:: ;Shift+D - Dig In
- Send d
- Return
- x:: ;X - Center map on unit
- Send {NumPad5}
- Return
- q:: ;Q - Unit Report
- Send u
- Return
- e:: ;E - Next Unit
- Send n
- Return
- +e:: ;Shift+E - Previous unit
- Send -
- Return
- ^e:: ;Ctrl+E - End Turn
- Send e
- Return
- Space:: ;Space - Plan Attack
- Send p
- Return
- v:: ;V - Toggle view units, hold down needs check for Space
- Send {Space down}
- KeyWait, v
- Send {Space up}
- Return
- #IfWinActive
- /***************
- ; The long-winded WASD way
- ; WASD Keys
- w::
- Send,{Up down}
- KeyWait, w
- Send,{Up up}
- Return
- a::
- Send,{Left down}
- KeyWait, a
- Send,{Left up}
- Return
- s::
- Send,{Down down}
- KeyWait, s
- Send,{Down up}
- Return
- d::
- Send,{Right down}
- KeyWait, d
- Send,{Right up}
- Return
- ; The Remap shortcut
- ; This didn't work as well as it should... :(
- ; Other keys
- +w::w ;Shift+W, Weather Report
- +a::+a ;Shift+A, Air Briefing
- ^a::a ;Ctrl+A, Air Unit Report
- +d::d ;Shift+D, Dig In
- x::Numpad5 ;X, Center map on unit
- q::u ;Q, Unit Report
- e::n ;E, Next Unit
- +e::- ;Shift+E, Previous unit
- ^e::e ;Ctrl+E, End Turn
- Space::p ;Space, Plan Attack
- v::Space ;V, Toggle view units
- ****************/
Add Comment
Please, Sign In to add comment