Advertisement
freezmi

oblivion remastered - QoL script for the no hud mod

Jun 18th, 2025 (edited)
491
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #Requires AutoHotkey v2.0
  2. #Include AutoHotInterception.ahk
  3.  
  4. ; Initialize AHI
  5. keyboardId := 1
  6. AHI := AutoHotInterception()
  7.  
  8. ; Game window title contains some unexpected spaces at the end
  9. gameWindowTitle := "The Elder Scrolls IV: Oblivion Remastered  "
  10.  
  11. ; QoL script that toggle the UI visibility while using the
  12. ; No-HUD-No-Effects mod in Oblivion Remastered
  13. ; when opening the inventory, map or the system menu
  14. ; dependencies:
  15. ;  https://www.autohotkey.com/
  16. ;  https://github.com/oblitum/Interception
  17. ;  https://github.com/evilC/AutoHotInterception
  18. ; author: chatgpt
  19.  
  20.  
  21. ; the HUD must be off when enabling this script
  22. ; global toggle state changed via Shift+h
  23. isEnabled := false
  24.  
  25. ; Toggle hotkey: Shift+h
  26. +h::
  27. {
  28.     global isEnabled
  29.     isEnabled := !isEnabled
  30.    
  31.     if isEnabled {
  32.         SoundBeep 300, 150  ; One beep for enabled
  33.     } else {
  34.         SoundBeep 300, 100  ; First low beep
  35.         Sleep 100
  36.         SoundBeep 300, 100  ; Second low beep
  37.     }
  38.     return
  39. }
  40.  
  41. ~i::
  42. ~m::
  43. ~t::
  44. ~Esc::
  45. {
  46.     global isEnabled, AHI, keyboardId
  47.     if !isEnabled
  48.         return
  49.        
  50.     ; Only act if active window title matches
  51.     if WinGetTitle("A") != gameWindowTitle {
  52.         return
  53.     }
  54.  
  55.     ; Send 'End' key (press + release)
  56.     AHI.SendKeyEvent(keyboardId, GetKeySC("End"), 1)
  57.     Sleep 50
  58.     AHI.SendKeyEvent(keyboardId, GetKeySC("End"), 0)
  59. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement