Page 1 of 1
Option for single instance of QLC+
Posted: Mon Jul 13, 2015 7:04 am
by nedmech
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.
Re: Option for single instance of QLC+
Posted: Thu Jul 16, 2015 9:17 am
by plugz
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
Re: Option for single instance of QLC+
Posted: Fri Jul 17, 2015 12:02 am
by nedmech
plugz wrote:There's no built-in way to do this.
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+.
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
Re: Option for single instance of QLC+
Posted: Tue Nov 10, 2015 2:23 am
by nedmech
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:
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
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.