This script worked for me.... it's for a PC game (X-Out). See if it works for you. Obviously change the game's directory and exe as well as the saved game's preset via shaderglass. Not sure about emulation YET... I will try it out. But I'm currently working on DOSBox. I'm having trouble with it via LAUNCHBOX.
@echo off
set "App1Path=D:\-[ GAMING ]-\ShaderGlass\ShaderGlass.exe"
set "App1Args=-preset "D:\-[ GAMING ]-\ShaderGlass\XOut_Preset.sgp" -fullscreen"
set "App1Process=ShaderGlass.exe"
set "App2Path=D:\Games\X Out Resurfaced\X-Out.exe"
set "App2Process=X-Out.exe"
echo Launching ShaderGlass...
start "" "%App1Path%" %App1Args%
echo Launching X-Out...
start "" "%App2Path%"
echo Waiting for X-Out to close...
:CheckApp2
tasklist /fi "imagename eq %App2Process%" | find /i "%App2Process%" > nul
if not errorlevel 1 (
timeout /t 2 > nul
goto CheckApp2
)
echo %App2Process% has been closed. Terminating %App1Process%...
taskkill /im %App1Process% /f
exit