Shadrach

Flashpoint Campaigns AHK

Nov 19th, 2022 (edited)
1,419
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 ; Force single running instance
  5. SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
  6. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
  7. SetTitleMatchMode RegEx ; Regex title finding
  8.  
  9. ; Exclusions
  10. GroupAdd, Exlude_class, ahk_class TfOrders
  11. GroupAdd, Exlude_class, ahk_class TfSpotlight
  12.  
  13. ; Main
  14. ;#If WinActive("ahk_exe FlashpointCampaigns.exe")
  15. ;#If WinActive("ahk_exe FlashpointCampaigns.exe") and WinActive("ahk_class TfMain")
  16. #If WinActive("ahk_exe FlashpointCampaigns.exe") and WinActive("ahk_class ^Tf.*")
  17. and !WinActive("ahk_group Exlude_class")
  18.  
  19. ; Suspend: Pause
  20. Pause::Suspend
  21.  
  22. ; WASD keys scroll + context nav
  23. w::Send {Up}{Numpad8}
  24. a::Send {Left}{Numpad4}
  25. s::Send {Down}{Numpad2}
  26. d::Send {Right}{Numpad6}
  27.  
  28. ; Arrow keys scroll + context nav
  29. Up::Send {Up}{Numpad8}
  30. Left::Send {Left}{Numpad4}
  31. Down::Send {Down}{Numpad2}
  32. Right::Send {Right}{Numpad6}
  33.  
  34. ; Hotkey remapping
  35. Space::Send {Enter} ; Space - Enter
  36. Tab::Send ^n        ; Tab - Next Unit
  37. +Tab::Send ^b       ; Shift+Tab - Previous Unit
  38. c::Send {Numpad5}   ; C - Center on current hex
  39. q::Send {F4}        ; Q - Unit Dashboard
  40. e::Send {F6}        ; E - Subunit Inspector
  41. |::Send {F7}        ; | - Log
  42. +s::Send ^k     ; Shift+S - SOP Manager
  43. r::Send ^r      ; R - Rotate Stack
  44. f::Send ^l      ; F - Line-Of-Sight
  45. g::Send ^o      ; G - Spottable From
  46. h::Send ^p      ; H - SOP Ranges
  47. t::Send ^y      ; T - Enemies Spotted
  48. y::Send ^d      ; Y - Range Rings
  49. v::Send ^u      ; V - Hide Units
  50. ; e::Send {Click,right} ; Right-click
  51.  
  52. ; Zoom controls
  53. z::Send {WheelUp}   ; Zoom In
  54. x::Send {WheelDown} ; Zoom Out
  55.  
  56. #If ; End main
  57.  
  58. ; UNIT DASHBOARD
  59. #If WinActive("ahk_class TfUnitDashboardNew")
  60. q::Send {F4}    ; Q - Close Unit Dashboard
  61. Esc::Send {F4}  ; Esc - Close Unit Dashboard
  62. #If ; End
  63.  
  64. ; SUBUNIT INSPECTOR
  65. #If WinActive("ahk_class TfSubunitInspector2")
  66. e::Send {F6}    ; E - Close SubUnit Inspector
  67. Esc::Send {F6}  ; Esc - Close SubUnit Inspector
  68. #If ; End
  69.  
  70. ; SOP MANAGER
  71. #If WinActive("ahk_class TfSOPInspector")
  72. +s::Send ^k     ; Shift+S - Close SOP Manager
  73. Esc::Send ^k    ; Esc - Close SOP Manager
  74. #If ; End
  75.  
  76. ; Spotlight
  77. #If WinActive("ahk_class TfSpotlight")
  78. w::Send {Up}
  79. a::Send {Left}
  80. s::Send {Down}
  81. d::Send {Right}
  82. #If ; End
  83.  
Advertisement