toggle button prblem

55 views
Skip to first unread message

Kalman Tarr

unread,
Mar 17, 2026, 12:57:32 PM (7 days ago) Mar 17
to QLab
Hi pros,
I have a workspace with a group cue.
There are 4 toggle buttons with different names with different names on mode tab which show the different group modes.
I'd like to know the names of the toggle buttons in a list variable. Plus the name or title of default toggle button.
I wrote a scripit but it doesn't work good. 
—————————————————

tell application "System Events"

tell (first application process whose bundle identifier is "com.figure53.QLab.5")

tell (first group of splitter group 1 of window 1 whose description is "cue inspector")

try

tell (first button whose description is "mode") to click

end try


tell (buttons whose type is "toggle button") to set theNames to (get title as list)

set defValue to (get name)

end tell

end tell

end tell


The DefValue variable gives a "missig vlaue" answer. Hmm

——————————————————
I can't find the solution to this problem! Pls help....
I hope my question is understandable.
Thanks in advance.

Best
Kalman

Rich Walsh

unread,
Mar 17, 2026, 6:31:59 PM (7 days ago) Mar 17
to ql...@googlegroups.com
Did you try burrowing down into the UI elements to see what is going on?

Here is the script for that again:

tell application "System Events" to tell (first application process whose bundle identifier is "com.figure53.QLab.5")

set allElements to UI elements of window 1

set allInfo to {}

set i to 0

repeat until i = (count allElements)

set eachElement to item (i + 1) of allElements

set end of allInfo to properties of eachElement

try

set allElements to allElements & UI elements of eachElement

end try

set i to i + 1

end repeat

end tell

allInfo


Once you’ve done that the answer is obvious. There are no buttons whose type is “toggle button”. It’s a role description; they are checkboxes, as you can see from allClasses below:

-- Assuming you have navigated to the Mode tab of the Inspector…


tell application "System Events"

tell (first application process whose bundle identifier is "com.figure53.QLab.5")

tell group 1 of splitter group 1 of window 1

set allClasses to class of (UI elements whose role description is "toggle button")

set allNames to name of (UI elements whose role description is "toggle button")

set allValues to value of (UI elements whose role description is "toggle button")

end tell

end tell

end tell

log allClasses

log allNames

log allValues


Their names and values are now apparent too. There are five of them, not four. They look more like radio buttons to be honest – I was expecting to find them in a single UI element.

Rich

Kalman Tarr

unread,
Mar 18, 2026, 4:41:30 AM (6 days ago) Mar 18
to QLab
Hi Rich,

Thanks again your great help!
Thanks again for your great help!
I'll try to learn and dig deeper into the UI elements to understand what's going on.

Thanks agaiThanks again!

Sincerely,
Kalman

Reply all
Reply to author
Forward
0 new messages