If, like me, you always use RSASIO with Reaper when you play RS2014, you will find this script really useful. I've been using it myself for as long as I can remember using RSASIO with REAROUTE and REASTREAM.
Note that it only works on Windows. You will have to replace some paths and file names in it with a text editor.
A quick word on what it does: 1st, if Reaper is not already running, it starts it then waits 5 seconds. 2nd, it starts RS2014. 3rd, it periodically checks if no RS process is running (which means RS has been closed) and if so Reaper is gracefuly shut down and the script ends. (the script does not shut Reaper down, instead it sends to the process the same signal as if you closed Reaper's main window with the X button, which Reaper handles by itself as usual)
Useful tip: To start the script when launching the game through Steam you can do the following; Go in your Steam library, right-click on RS2014 and hit "Properties", in the General tab there is a text field called "Launch options" where you paste this :
"C:\Wherever\you\like\autostart_reaper.bat" %command% (adapt the path and keep the quotation marks!)
How to create a bash script for newbies: Right-click anywhere on your desktop where there is nothing under your cursor, then hit New -> Text Document. Open the document, paste in it the code, save and close. Then rename the document from Whatever.txt to Whatever.bat. If you can't see/change file extensions (.txt, .bat, etc....) there are guides for this, google it.
So before you read the code let me tell you this for good measure. I'm a stranger on the internet giving you code so you can run it on your metal. If you're not confortable with reading and understanding the code, or don't have complete trust in me, do this : (you should always do this btw) once you have the .bat file with the code in it saved on your disk, BEFORE RUNNING IT, go on Virustotal and put it to the test. I always do that.
Anyway here is the code.
Spoiler
@echo off
:: =========================================================================
:: =========================================================================
set "REQUIRED=C:\Program Files (x86)\REAPER\reaper.exe"
set "MAIN=D:\SteamLibrary\steamapps\common\Rocksmith2014\Rocksmith2014.exe"
set "REQUIREDSHORT=reaper.exe"
set "MAINSHORT=Rocksmith2014.exe"
:: =========================================================================
:: =========================================================================
:: Check if prerequisite is already running
tasklist | findstr /I /C:"%REQUIREDSHORT%" > nul
if %errorlevel% neq 0 (
echo Starting %REQUIREDSHORT%
start "" "%REQUIRED%"
) else (
echo %REQUIREDSHORT% already started.
)
:: Wait 5 seconds before launching the main process
timeout /t 5 /nobreak > nul
echo Starting %MAINSHORT%
start "" "%MAIN%"
:: Loop until the main process is terminated
:CHECK_PROCESS
timeout /t 1 /nobreak > nul
tasklist | findstr /I /C:"%MAINSHORT%" > nul
if %errorlevel% equ 0 goto CHECK_PROCESS
:: Send a proper shutdown signal to the prerequisite process
:: It does NOT kill the process, it acts as if the main window as been closed by the user
:: For most softs, as Reaper, it effectively shuts it down in a clean way.
echo Shutting down %REQUIREDSHORT%
wmic process where "name='%REQUIREDSHORT%'" call terminate > nul
::echo All processes have stopped.
::timeout /t 3 /nobreak > nul
exit
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
TLDR: The code is in the spoiler at the end.
If, like me, you always use RSASIO with Reaper when you play RS2014, you will find this script really useful. I've been using it myself for as long as I can remember using RSASIO with REAROUTE and REASTREAM.
Note that it only works on Windows. You will have to replace some paths and file names in it with a text editor.
A quick word on what it does: 1st, if Reaper is not already running, it starts it then waits 5 seconds. 2nd, it starts RS2014. 3rd, it periodically checks if no RS process is running (which means RS has been closed) and if so Reaper is gracefuly shut down and the script ends. (the script does not shut Reaper down, instead it sends to the process the same signal as if you closed Reaper's main window with the X button, which Reaper handles by itself as usual)
Useful tip: To start the script when launching the game through Steam you can do the following; Go in your Steam library, right-click on RS2014 and hit "Properties", in the General tab there is a text field called "Launch options" where you paste this :
"C:\Wherever\you\like\autostart_reaper.bat" %command%(adapt the path and keep the quotation marks!)How to create a bash script for newbies: Right-click anywhere on your desktop where there is nothing under your cursor, then hit New -> Text Document. Open the document, paste in it the code, save and close. Then rename the document from Whatever.txt to Whatever.bat. If you can't see/change file extensions (.txt, .bat, etc....) there are guides for this, google it.
So before you read the code let me tell you this for good measure. I'm a stranger on the internet giving you code so you can run it on your metal. If you're not confortable with reading and understanding the code, or don't have complete trust in me, do this : (you should always do this btw) once you have the .bat file with the code in it saved on your disk, BEFORE RUNNING IT, go on Virustotal and put it to the test. I always do that.
Anyway here is the code.
Spoiler