Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Requires AutoHotkey v2.0
- #Include AutoHotInterception.ahk
- ; Initialize AHI
- keyboardId := 1
- AHI := AutoHotInterception()
- ; Game window title contains some unexpected spaces at the end
- gameWindowTitle := "The Elder Scrolls IV: Oblivion Remastered "
- ; QoL script that toggle the UI visibility while using the
- ; No-HUD-No-Effects mod in Oblivion Remastered
- ; when opening the inventory, map or the system menu
- ; dependencies:
- ; https://www.autohotkey.com/
- ; https://github.com/oblitum/Interception
- ; https://github.com/evilC/AutoHotInterception
- ; author: chatgpt
- ; the HUD must be off when enabling this script
- ; global toggle state changed via Shift+h
- isEnabled := false
- ; Toggle hotkey: Shift+h
- +h::
- {
- global isEnabled
- isEnabled := !isEnabled
- if isEnabled {
- SoundBeep 300, 150 ; One beep for enabled
- } else {
- SoundBeep 300, 100 ; First low beep
- Sleep 100
- SoundBeep 300, 100 ; Second low beep
- }
- return
- }
- ~i::
- ~m::
- ~t::
- ~Esc::
- {
- global isEnabled, AHI, keyboardId
- if !isEnabled
- return
- ; Only act if active window title matches
- if WinGetTitle("A") != gameWindowTitle {
- return
- }
- ; Send 'End' key (press + release)
- AHI.SendKeyEvent(keyboardId, GetKeySC("End"), 1)
- Sleep 50
- AHI.SendKeyEvent(keyboardId, GetKeySC("End"), 0)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement