On Thu, Mar 3, 2016 at 7:22 PM Jake Rich lea...@gmail.com wrote:
Has anyone looked into the ability to ask qlab if it has any active ques playing? i'm creating a controller with xkeys and would like to have a light that is on when ques are active. maybe an applescript? does qlab report this over midi somehow?
You can determine this via AppleScript, but you’ll want to pick a sensible delay between loop iterations to keep from wasting tons of CPU time querying and calculating.
I don’t have a script offhand that does exactly what you want, but you can use this script I wrote for another customer to only “go” when no other cues were active as a starting point:
tell application id "com.figure53.qlab.3" to tell front workspace
set cuesCount to -1 --set to -1 so it doesn't count itself!
set activeCues to active cues
repeat with eachCue in activeCues
set cuesCount to cuesCount + 1
end repeat
if cuesCount is 0 then
go
end if
end tell
-Andy
—
Andy Lang
@SoundGuyAndysup...@figure53.com
/workspace/{id}/runningCues
tell application id "com.figure53.qlab.3" to tell front workspace
set cuesCount to 0
set activeCues to active cues
repeat with eachCue in activeCues
set cuesCount to cuesCount + 1
end repeat
if cuesCount is 0 then
return 1
else if cuesCount > 0 then
return 0
end if
end tellset cuesCount to count active cues
tell application id "com.figure53.qlab.3" to tell front workspace to return ((count active cues) = 0) as integer