Progress Bar for QLab script cues

109 views
Skip to first unread message

micpool

unread,
Jun 22, 2023, 8:52:10 AM6/22/23
to QLab
This is a bit experimental (tested with QLab 5) but if anyone wants to give this a try, and let me know how it goes....

Screenshot 2023-06-22 at 13.38.39.png

Download this app and put in your applications folder
https://we.tl/t-ewjBmD0r4D

Create a memo cue numbered "PROGV"

For any script you want to display a progress bar for,  use this as a template and put your code in to replace the comment --do some stuff:

---Setup script with progress bar

--requires MicsProgressBar.app to be installed in applications folder

--requires a memo cue numbered "PROGV"

--tested with QLab5

--use at your own risk

tell application id "com.figure53.QLab.5" to tell front workspace

set theCount to 25 --number of iterations (can be calculated)

set the pre wait of cue "PROGV" to 0

set the post wait of cue "PROGV" to theCount

tell application "MicsProgressBar" to activate

repeat theCount times

-------------------------------

--do some stuff

delay 0.1

----------------------------------

--increment the count

set the pre wait of cue "PROGV" to the (pre wait of cue "PROGV") + 1

end repeat

end tell


It will put up a security splash the first time you run it but should be good after that.

The app reads a memo cue numbered PROGV and uses the pre wait for the completed steps, the post wait for the total steps and the cue name for the Progress Message


The app itself is an AppleScript compiled as an enhanced app in Late Night Software's script debugger.

That was the only way I could get the progress window to appear. The script source for the app is

use AppleScript version "2.4" -- Yosemite (10.10) or later

use scripting additions

try

repeat

tell application "QLab5" to tell front workspace

set theSteps to the post wait of cue "PROGV"

set theCompleted to pre wait of cue "PROGV"

set theDescription to q list name of cue "PROGV"

end tell

if theCompletedtheSteps then quit

set progress total steps to theSteps

set progress completed steps to theCompleted

set progress description to theDescription

delay 0.1

end repeat

--quit routine for Script Debugger Enhanced apps

on error number -128

quit

end try


Screen recording attached


Mic
Screen Recording 2023-06-22 at 13.21.52.mov
Reply all
Reply to author
Forward
0 new messages