Option for single instance of QLC+
- nedmech
- Posts: 83
- Joined: Sat Jun 20, 2015 12:39 am
- Real Name: Nathan Durnan
I may have missed something, but is it possible to set up QLC+ so that only one instance of the application can be launched? I ran into an instance this morning where the (new) lighting operator didn't see the first instance of QLC+ open because it was minimized. They opened a second instance, and nothing worked right because both were fighting for control of the same universes. Took a little head-scratching to figure out what had happened.
-
- Posts: 637
- Joined: Sun Apr 12, 2015 6:30 pm
- Real Name: David
There's no built-in way to do this.
Some tricks exist (you have to wrap QLC+ in a shell script): https://stackoverflow.com/questions/185 ... running-at
Some tricks exist (you have to wrap QLC+ in a shell script): https://stackoverflow.com/questions/185 ... running-at
- nedmech
- Posts: 83
- Joined: Sat Jun 20, 2015 12:39 am
- Real Name: Nathan Durnan
Thanks, that's kinda what I was thinking. I had played with the idea of wrapping it in a script, but didn't want to reinvent the wheel if the feature was already in QLC+.plugz wrote:There's no built-in way to do this.
Is it a feature that hasn't been added because it hasn't been a priority and nobody has had time, or has is there some technical difficulty that would make it impossible to implement? I'm not opposed to contributing some time and code to the project if it's a possibility to implement and others would consider it worthwhile.
It looks like I'd have a good starting point here:
http://stackoverflow.com/questions/5006 ... protection
- nedmech
- Posts: 83
- Joined: Sat Jun 20, 2015 12:39 am
- Real Name: Nathan Durnan
Resurrecting an old topic since I had the issue pop back up again this weekend. For now, I've made a batch script (running WinXP & Win7) to check for 'qlcplus.exe' before attempting to launch it again. I had to go into the registry editor and modify the file association commands, but now my operators can't accidentally launch more than one instance of QLC+ and cause the house lights to freak out.
Here's my batch script:
I put it in the same folder as qlcplus.exe so it would be easy to just rename the registry entry values from 'qlcplus.exe' to 'qlcpluslauncher.bat'.
Is there any interest from the development team in implementing a single-instance behavior for QLC+? I wouldn't mind spending some time exploring that option if it would benefit more than just me.
Here's my batch script:
Code: Select all
@echo off
tasklist /fi "IMAGENAME eq qlcplus.exe" | find /i "qlcplus.exe" > nul
if %ERRORLEVEL%==0 goto FOUND
:NOTFOUND
start "" "C:\QLC+\qlcplus.exe" %*
goto eof
:FOUND
echo QLC+ is already running!
pause
goto eof
Is there any interest from the development team in implementing a single-instance behavior for QLC+? I wouldn't mind spending some time exploring that option if it would benefit more than just me.