Advertisement
Shadrach

TOAW4 AHK WASD keys++

May 5th, 2018
829
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
  2. #Warn  ; Enable warnings to assist with detecting common errors.
  3. #UseHook On ; Keyboard hook
  4. #SingleInstance force
  5. SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
  6. SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
  7.  
  8. #If WinActive("ahk_class The Operational Art of War") and WinActive("ahk_exe Opart 4.exe")
  9.  
  10. ; Suspend: Pause
  11. Pause::Suspend
  12.  
  13. ;WASD keys
  14. w::Up
  15. a::Left
  16. s::Down
  17. d::Right
  18.  
  19. ; Other remappings
  20. +w:: ; Shift+W - Weather Report
  21.   Send w
  22.   Return
  23. +a:: ;Shift+A - Air Unit Report
  24.   Send a
  25.   Return
  26. ^a:: ;Ctrl+A - Air Briefing
  27.   Send +a
  28.   Return
  29. +d:: ;Shift+D - Dig In
  30.   Send d
  31.   Return
  32. x:: ;X - Center map on unit
  33.   Send {NumPad5}
  34.   Return
  35. q:: ;Q - Unit Report
  36.   Send u
  37.   Return
  38. +t:: ;Shift+T - Loss Tolenance
  39.   Send l
  40.   Return
  41. ^t:: ;Ctrl+T - Stack Loss Tolerance
  42.   Send {Shift}L
  43.   Return
  44. o:: ;Ctrl+O - Theater Options
  45.   Send {Shift}T
  46.   Return
  47. u:: ;U - OOB Units
  48.   Send o
  49.   Return
  50. Tab:: ;Tab - Next Unit
  51.   Send {+}
  52.   Return
  53. +Tab:: ;Shift+Tab - Previous unit
  54.   Send {-}
  55.   Return
  56. ^e:: ;Ctrl+E - End Turn
  57.   Send e
  58.   Return
  59. Space:: ;Space - Plan Attack
  60.   Send p
  61.   Return
  62. v:: ;V - Toggle view units, hold down needs check for Space
  63.   Send {Space down}
  64.   KeyWait, v
  65.   Send {Space up}
  66.   Return
  67. e:: ;E - Enter
  68.   Send {Enter}
  69.   Return
  70. ~b:: ; Find Place override
  71.   Suspend, On
  72.   input,_,v,{esc}{enter}
  73.   Suspend, Off
  74.   Return
  75. +r:: ;Shift+R; Refresh current unit
  76.   Send r
  77.   Return
  78. ^s:: ;Ctrl+S; Save game
  79.   Send !f,+a
  80.   Return
  81. F4:: ; ScrollLock override
  82.   Send {ScrollLock}
  83.   Return
  84. F5:: ; Quick Save
  85.   Send {F9}
  86.   Return
  87.  
  88. #IfWinActive
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement