Close Workspace

108 views
Skip to first unread message

gui

unread,
Oct 13, 2021, 4:05:18 PM10/13/21
to QLab
Hello,
I would like to know how to make a script to kill all back worspace.
For example I have Worspace 1 and workspace 2 open. I want at the beginning of the show play a script and  my workspace 2 close. Because with the midi remote control when i push go, all the worspace open are sent.

Thanks

gui

unread,
Oct 13, 2021, 4:15:45 PM10/13/21
to QLab
I Try without success:

tell application id "com.figure53.QLab.4" to tell front workspace
    workspace / (back workspace) / (close)
end tell

micpool

unread,
Oct 13, 2021, 4:42:25 PM10/13/21
to QLab
Exactly as you might expect!

tell application id "com.figure53.QLab.4" to tell last workspace to close

or by name

tell application id "com.figure53.QLab.4" to tell workspace "back.qlab4" to close --name of workspace goes here.

Mic

gui

unread,
Oct 14, 2021, 2:54:07 AM10/14/21
to QLab
That's exactly what i want. Thank you so much.

gui

unread,
Oct 15, 2021, 5:16:30 AM10/15/21
to QLab
Hello Micpool,
The script is perfect but i would like to add :
If there is only one worspace open then don't do anyting.
If there is two workspaces open then close the background worspace.

thanks in advance

micpool

unread,
Oct 16, 2021, 10:01:41 AM10/16/21
to QLab
OK let's make this universally applicable!

--close all workspaces apart from the front one

tell application id "com.figure53.QLab.4"
repeat (get count of workspaces) - 1 times
tell last workspace to close
end repeat
end tell

Mic
Reply all
Reply to author
Forward
0 new messages