PDA

View Full Version : RTST Batch File



Stygiis
03-23-2014, 12:19 PM
I've noticed I often forget to start RTST when I play Planetside so I came up with a solution. It's a combination of batch file and python file. The batch file handles monitoring and the python file is a work around for notifying the user if RTST is being started.

The batch file is as follows:


@echo off

tasklist /fi "imagename eq RTST.exe" | find ":" > nul
if errorlevel 1 (
echo "RTST is running..."
exit
)

tasklist /fi "imagename eq LaunchPad.exe" | find ":" > nul
if errorlevel 1 (
echo "LaunchPad is running..."
start beep.py
start /d "C:\Program Files (x86)\Recursion\RealTimeStatTracker" RTST
)

exit


and the python file:


import winsound
winsound.Beep(750,300)
winsound.Beep(750,300)
winsound.Beep(750,300)


If you don't care about the beeps, you can remove the "start beep.py" from the batch file. Because it's a batch file, you can set it to run on a schedule (aka every minutes, etc.) It basically just monitors your processes and if it detects the LaunchPad is started and RTST is not, it will start RTST automatically (and notify you with beeps if you choose.)

Exploding Fist
03-24-2014, 07:56 AM
Awesome, thanks for sharing that. One thing we still need to code in is the option to auto start sessions when your last monitored character is online. With something like this then you'd never have to push any buttons!

I will say that having the tracker open BEFORE Planetside is launched will become very important soon. Looping this with a one second sleep "timeout /t 1" at the end of the batch file would be good enough to catch it though.

Stygiis
03-24-2014, 08:35 AM
Awesome, thanks for sharing that. One thing we still need to code in is the option to auto start sessions when your last monitored character is online. With something like this then you'd never have to push any buttons!

I will say that having the tracker open BEFORE Planetside is launched will become very important soon. Looping this with a one second sleep "timeout /t 1" at the end of the batch file would be good enough to catch it though.

Yeah, I didn't include a loop in the file itself because I wasn't sure how I wanted to handle the looping. But, it's probably the best method. You could potentially bundle it with the installer as an optional install and then it could be passed through as a service to windows on start-up.

Exploding Fist
03-24-2014, 09:48 AM
If anything at some point we'd look into putting in the option to autostart to system tray on Windows login. That'd be the proper way to implement this.

Until then, a scripted hack job is a good solution :eng101:

Stygiis
03-24-2014, 09:51 AM
That's true. the only reason I like the script setup is that it's dependent on starting planetside. As it stands if you never start planetside, the tracker never launches. Granted the tracker requires nearly no memory, but it's something. I look forward to a more automated start-up in the future though.