Alert/notification/pop-up control

85 views
Skip to first unread message

Roly Botha

unread,
May 21, 2025, 12:45:11 PMMay 21
to QLab
Hello brains

A scripting question - I'm trying to have a little pop-up occur when the playhead is unlocked, and disappear when it’s re-locked. I’m a bit of a scripting rookie, so apologies if this is nonsense!

Thus far, I’ve got the first step to work. It’s all in a timeline group containing:

- network q to “toggleSelectionIsPlayhead”
- network q to query “selectionIsPlayhead” and return that to the notes of cue “SiP”
- script q containing:

tell application id "com.figure53.QLab.5" to tell front workspace
set thisCue to cue "SiP"
set myVariable to notes of thisCue
if myVariable is "0" then
display notification "Playhead is UNLOCKED"
else
display notification "Playhead is LOCKED"
end if
end tell

So, a notification will pop-up but cannot find any way to dismiss it.

Not at all wedded to a system notification, any solution welcome. I initially tried a display dialog but was scuppered by the dialog taking focus, meaning that QLab wasn’t usable until I’d manually dismissed the dialog.

Am I missing something very obvious?

Thanks!
--
Roly Botha (they/them)

Though I sometimes send emails at unusual times, I never expect anyone to respond outside their own working hours. 

Rich Walsh

unread,
May 21, 2025, 12:54:15 PMMay 21
to ql...@googlegroups.com
You need to set the Notifications preferences in System Settings for QLab 5 to use “Banners” rather than “Alerts”. Then they self dismiss.

(You should be able to tell from the icon which application is actually posting the notification, so as to know which preferences to set.)

Rich

Roly Botha

unread,
May 30, 2025, 2:55:48 PMMay 30
to ql...@googlegroups.com
Hey Rich

Thanks for this - not sure why I missed it initially! 

I’ve played with this but the trouble that I’m having is that ideally I’d love the alert to stay active/visible until the shortcut is hit to re-link playhead & selection, at which point it would be dismissed.

Thanks!
--
Roly Botha (they/them)


Though I sometimes send emails at unusual times, I never expect anyone to respond outside their own working hours.

On 21 May 2025, at 17:54, 'Rich Walsh' via QLab <ql...@googlegroups.com> wrote:

You need to set the Notifications preferences in System Settings for QLab 5 to use “Banners” rather than “Alerts”. Then they self dismiss.
--
Contact support anytime: sup...@figure53.com
User Group Code of Conduct: https://qlab.app/code-of-conduct/
 
Instagram: https://www.instagram.com/Figure53
Bluesky: https://bsky.app/profile/qlab.app
---
You received this message because you are subscribed to the Google Groups "QLab" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qlab+uns...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/qlab/A07A89AA-92AD-47FD-A70F-99F98CB6F2DE%40mac.com.

micpool

unread,
May 30, 2025, 4:41:59 PMMay 30
to QLab
On Friday, May 30, 2025 at 7:55:48 PM UTC+1 Roly Botha wrote:
I’ve played with this but the trouble that I’m having is that ideally I’d love the alert to stay active/visible until the shortcut is hit to re-link playhead & selection, at which point it would be dismissed.

So what you are really asking for is some means of displaying at the top UI level of a workspace window (i.e an element of a QLab workspace that is visible at all times) an indicator which shows whether the playhead is locked or unlocked to the selection. 

This might be a good feature request, but in the meantime, if you are happy just having this indication triggered whenever you lock or unlock the playhead to the selection by means of a cue (as you were doing with your notification) then you could use: 

tell application "System Events" to tell appearance preferences  to set appearance to graphite --or blue

This makes use of what I assume is an obsolete feature from Aqua that will change QLab's selection indicator from blue to graphite. (Those are the only two valid values for this property). In recent OS's this is actually the accent colour   From system preferences/appearance  you can change QLab's selected cue colour to any of 8 colours (and  back to QLab's blue  default by  selecting Multicolour), but using AppleScript only Blue and Graphite are available.

There might be a good reason not to do this(!), but it seems to work and is an always visible indicator which could be used for a variety of purposes, but seems ideal for your need to display the state of the playhead to selection lock


Mic

micpool

unread,
May 30, 2025, 5:04:38 PMMay 30
to QLab
Here's a workspace that has 2 scripts to unlock or lock the playhead to the selection and change the selection color to indicate the state.

Unlock Hotkey 1

set theMessage to "/settings/general/selectionIsPlayhead false"

do shell script "echo " & quoted form of theMessage & "| nc -u -w 0 127.0.0.1 53535"

tell application "System Events" to tell appearance preferences to set appearance to graphite


Lock Hotkey 2

set theMessage to "/settings/general/selectionIsPlayhead true"

do shell script "echo " & quoted form of theMessage & "| nc -u -w 0 127.0.0.1 53535"

tell application "System Events" to tell appearance preferences to set appearance to blue



Screen Recording 2025-05-30 at 22.00.34.mov
Graphite.qlab5

Roly Botha

unread,
May 30, 2025, 5:17:24 PMMay 30
to ql...@googlegroups.com, QLab
Mic, this is absolutely the sort of thing I was looking for!! I had a brief look at changing the selection colour and couldn’t find anything but this is so perfect.

Appreciate your insight, thank you!


Thanks!
--
Roly Botha (they/them)


Though I sometimes send emails at unusual times, I never expect anyone to respond outside their own working hours.

On 30 May 2025, at 22:04, micpool <m...@micpool.com> wrote:

Here's a workspace that has 2 scripts to unlock or lock the playhead to the selection and change the selection color to indicate the state.
--
Contact support anytime: sup...@figure53.com
User Group Code of Conduct: https://qlab.app/code-of-conduct/
 
Instagram: https://www.instagram.com/Figure53
Bluesky: https://bsky.app/profile/qlab.app
---
You received this message because you are subscribed to the Google Groups "QLab" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qlab+uns...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/qlab/f7c6284c-837c-4b13-a460-2aa5735f0f6bn%40googlegroups.com.
<Screen Recording 2025-05-30 at 22.00.34.mov>
<Graphite.qlab5>
Reply all
Reply to author
Forward
0 new messages