Instructions
- Copy and paste the code below into a new text file.
- Change C:\Users\ProfileName\Music\PathToSomeMediaFile.mp3 to a valid sound/video file that you want to play when FA starts.
- Save the text file as GalacticWarNotification.bat
- Run (double click) on the batch file that you just saved.
- Attack a planet
- Wait...
NOTE: You must restart the script after each time it notifies you.
- Code: Select all
@ECHO OFF
ECHO FAF Galactic War Notification Script v1.0
ECHO by Duck_42
ECHO -----------------------------------------
ECHO Waiting for Forged Aliance to start...
ECHO Press Ctrl-C to quit
:mainloop
tasklist /FI "IMAGENAME eq ForgedAlliance.exe" 2>NUL | find /I /N "ForgedAlliance.exe">NUL
if "%ERRORLEVEL%"=="0" GOTO PlayAlert
timeout /T 1 /NOBREAK > NUL
goto mainloop
:PlayAlert
ECHO Forged Aliance has started!
ECHO Triggering notification...
ECHO -----------------------------------------
start "C:\Program Files\Windows Media Player\wmplayer.exe" "C:\Users\ProfileName\Music\PathToSomeMediaFile.mp3"
ECHO Script finished!
pause
As always, please post any questions or comments on this thread so I'll be sure to see them.