Hello,
this is a simple way to reliably have your OBS Studio startup with Windows, with replay buffer enabled.
Prerequisites:
AutoHotkey
OBS Studio:
-replay buffer enabled (Settings, Output -> Enable Replay Buffer)
-set hotkey for Save Replay (Settings, Hotkeys) Ctrl + Shift + S is used in the guide
1. Create the AutoHotkey script
Open Notepad, paste this code and save it as "Something.ahk" (make sure you're not saving it as ahk.txt).
Make sure the file location is correct on the "Run ..." line. To get the correct location right click your OBS Studio shortcut from desktop or Start menu, select Open file location and look at the path there. You cannot use direct path to "Program Files (x86)\obs-studio\bin", you need to use the shortcut path.
2. Add the AutoHotkey script to startup
Open "Run" by pressing Windows + R, type "shell:startup" and click OK. Paste your .ahk file in here to add it to startup.
Now as you start your PC the AutoHotkey script will re-launch itself as admin, launch OBS Studio and press the hotkey to Start your replay buffer.
Hope this helps!
this is a simple way to reliably have your OBS Studio startup with Windows, with replay buffer enabled.
Prerequisites:
AutoHotkey
OBS Studio:
-replay buffer enabled (Settings, Output -> Enable Replay Buffer)
-set hotkey for Save Replay (Settings, Hotkeys) Ctrl + Shift + S is used in the guide
1. Create the AutoHotkey script
Open Notepad, paste this code and save it as "Something.ahk" (make sure you're not saving it as ahk.txt).
Code:
full_command_line := DllCall("GetCommandLine", "str")
if not (A_IsAdmin or RegExMatch(full_command_line, " /restart(?!\S)"))
{
try
{
if A_IsCompiled
Run *RunAs "%A_ScriptFullPath%" /restart
else
Run *RunAs "%A_AhkPath%" /restart "%A_ScriptFullPath%"
}
ExitApp
}
Run C:\ProgramData\Microsoft\Windows\Start Menu\Programs\OBS Studio\OBS Studio (64bit) ; must be shortcut
Sleep 4000
Send {LControl Down}{LShift Down}{e Down} ; change this to your "Save Replay" hotkey, see list of hotkeys at https://autohotkey.com/docs/KeyList.htm
Sleep 200
Send {LControl Up}{LShift Up}{e Up}
Make sure the file location is correct on the "Run ..." line. To get the correct location right click your OBS Studio shortcut from desktop or Start menu, select Open file location and look at the path there. You cannot use direct path to "Program Files (x86)\obs-studio\bin", you need to use the shortcut path.
2. Add the AutoHotkey script to startup
Open "Run" by pressing Windows + R, type "shell:startup" and click OK. Paste your .ahk file in here to add it to startup.
Now as you start your PC the AutoHotkey script will re-launch itself as admin, launch OBS Studio and press the hotkey to Start your replay buffer.
Hope this helps!