Advertisement
t3h_m00kz

AUTOHOTKEY - Halo Infinite - Campaign

Dec 10th, 2021 (edited)
1,583
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2. ;m00kz Halo Infinite campaign;
  3. ;      ability hotkeys       ;
  4. ;AutoHotKey Version 1.1.32.00;
  5. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  6. ;Install AutoHotKey
  7. ;Save this text file with an .AHK extension to open it with AutoHotKey
  8. ;AutoHotKey.exe MUST BE SET TO RUN AS ADMINISTRATOR to function in Halo Infinite
  9. ;Tweak the "BINDINGS" section of this file to your liking
  10. ;AutoHotKey instruction manual: https://www.autohotkey.com/docs/AutoHotkey.htm
  11.  
  12. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  13. ;Initialization - don't know if I need all this shit but being safe;
  14. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  15.  
  16. #NoEnv
  17.     ;Avoids checking empty variables to see if
  18.     ;they are environment variables
  19.     ;(recommended for all new scripts).
  20.  
  21. #SingleInstance, Force
  22.     ;Skips the dialog box and replaces the old
  23.     ;instance automatically, which is similar
  24.     ;in effect to the Reload command.
  25.  
  26. #Persistent
  27.     ;Keeps a script permanently running (that
  28.     ;is, until the user closes it or ExitApp
  29.     ;is encountered).
  30.  
  31. #InstallKeybdHook
  32.     ;Forces the unconditional installation of
  33.     ;the keyboard hook.
  34.  
  35. #UseHook
  36.     ;Force the use of the hook for hotkeys
  37.     ;after this point.
  38.  
  39. #KeyHistory, 0
  40.     ;Sets the maximum number of keyboard and
  41.     ;mouse events displayed by the KeyHistory
  42.     ;window. You can set it to 0 to disable
  43.     ;key history.
  44.  
  45. #HotKeyInterval 1
  46.     ;Along with #MaxHotkeysPerInterval,
  47.     ;specifies the rate of hotkey activations
  48.     ;beyond which a warning dialog will be
  49.     ;displayed.
  50.  
  51.  
  52. #MaxHotkeysPerInterval 127
  53.     ;Along with #HotkeyInterval, specifies the
  54.     ;rate of hotkey activations beyond which a
  55.     ;warning dialog will be displayed.
  56.  
  57. SetKeyDelay,-1, 1
  58.     ;Sets the delay that will occur after each
  59.     ;keystroke sent by Send and ControlSend.
  60.  
  61. SetControlDelay, -1
  62.     ;Sets the delay that will occur after each
  63.     ;control-modifying command.
  64.  
  65. SetMouseDelay, -1
  66.     ;Sets the delay that will occur after each
  67.     ;mouse movement or click.
  68.  
  69. SetWinDelay,-1
  70.     ;Sets the delay that will occur after each
  71.     ;windowing command, such as WinActivate.
  72.  
  73. SendMode, Input
  74.     ;Switches to the SendInput method for Send,
  75.     ;SendRaw, Click, and MouseMove/Click/Drag.
  76.  
  77. ;SendMode, InputThenPlay
  78.     ;Same as above except that rather than
  79.     ;falling back to Event mode when SendInput
  80.     ;is unavailable, it reverts to Play mode
  81.     ;(below). This also causes the SendInput
  82.     ;command itself to revert to Play mode when
  83.     ;SendInput is unavailable.
  84.  
  85. ;PID := DllCall("GetCurrentProcessId")
  86. ;Process, Priority, %PID%, High
  87.  
  88. ;;;;;;;;;;
  89. ;Bindings;
  90. ;;;;;;;;;;
  91. #If WinActive("ahk_exe HaloInfinite.exe")
  92.     ;Checks if the game .exe is the active window
  93.  
  94. ;Grapple
  95. *1::
  96. *CapsLock::
  97.     send {1 down}
  98.     sleep 10
  99.     send {1 up}
  100.     useAbility()
  101.     return
  102.  
  103. ;Dash - Control key activates on up unless using ~ prefix
  104. *2::
  105. *~Control::
  106.     send {2 down}
  107.     sleep 10
  108.     send {2 up}
  109.     useAbility()
  110.     return
  111.  
  112. ;Shield Wall
  113. *3::
  114.     send {3 down}
  115.     sleep 10
  116.     send {3 up}
  117.     useAbility()
  118.     return
  119.  
  120. ;Threat Sensor
  121. *4::
  122.     send {4 down}
  123.     sleep 10
  124.     send {4 up}
  125.     useAbility()
  126.     return
  127.    
  128. ;Fix janky mouse wheel weapon switch by adding a delay between inputs (weapon switch bound to U key)
  129. *WheelUp::
  130.     send {u down}
  131.     sleep 10
  132.     send {u up}
  133.     sleep 115
  134.     return
  135.  
  136. ;;;;;;;;;;;
  137. ;Functions;
  138. ;;;;;;;;;;;
  139. useAbility(){ ;Use the ability (ability bound to O key)
  140.     sleep 20
  141.     send {o down}
  142.     sleep 10
  143.     send {o up}
  144.     }
  145.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement