0 of 0

File information

Last updated

Original upload

Created by

Mikemc

Uploaded by

Mikemc31

Virus scan

Safe to use

About this mod

Assign buttons to scroll through your Favorites bar fluently, using Auto Hotkey.

Permissions and credits


https://autohotkey.com

This Auto Hotkey (AHK) script will allow you to fluently scroll through your favorites bar as if they were bound to the Mouse Wheel. Sadly, I could not get the wheel to unbind itself from Fallout, but if you can then this script can easily be modified to work with it. I will upload the .ahk file, however I will also post it here so you can look at it. I have added comments to the file to make it easier to understand.

Simply put, the code has a variable with a starting slot number. When you press a key, it adds or subtracts 1 to that number, then switches to the slot with the same keyboard number. In my game, I use slot 1 for Stimpacks; there is code to skip number 1 included but is commented out by default.

============================================

; Semicolon before a line tells AHK to ignore that line.
; SingleInstance means the script can only run one at a time.
; Persistent makes it repeat until exited.
; WinActive tells it to only work while Fallout4 is running.
; InstallMouseHook tells AHK that the mouse will be used.
;
; Colon and Equals together ( := ) sets a value.
;
; Mouse & Keyboard commands:
; https://autohotkey.com/docs/KeyList.htm

#SingleInstance Force
#Persistent
#IfWinActive ahk_class Fallout4
#InstallMouseHook

; Create a variable called 'weap_slot' and set it to 1
weap_slot := 1

; -----Ascends the weapon wheel-----

; Mouse button 5 (Forward)
XButton2::
weap_slot := weap_slot+1

; If the hotbar value is 10, set it to 0
if (weap_slot > 9)
weap_slot := 0

; Remove the semicolons in the following lines if you use slot 1 for Stimpacks like I do.
;if (weap_slot = 1)
;weap_slot := 2

Goto change_weapon

; -----Descends the weapon wheel-----

; Mouse button 4 (Back)
XButton1::
weap_slot := weap_slot-1

; Remove the semicolons in the following lines if you use slot 1 for Stimpacks like I do.
;if (weap_slot = 1)
;weap_slot := 0

; If the hotbar value is in the negatives, send it to 9.
if (weap_slot < 0)
weap_slot := 9

Goto change_weapon

; Menu title has a colon after its name.
change_weapon:
SetKeyDelay, 20,50
SendEvent, %weap_slot%
Return