fade curve

89 views
Skip to first unread message

Kalman Tarr

unread,
Oct 28, 2024, 2:55:16 PM10/28/24
to QLab
Hi Pros,
I'm working  on a Qlab workspace with contains several 'fade' cue.
In a script I'd like to read out the Fade cue's 'curve tab' curve name parameter.
The problem is the next, I read the parameter in a repeat loop.
And the parameter is always the same, the value of first fade cue.
E.g.: s-curve

The repeat loop is:

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

set allCues to cues whose broken is false and q type is "fade" as list --in (current cue list) as list

repeat with eachCue in allCues

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

set theCurve to get value of pop up button 2 of group 1 of splitter group 1 of window 1

end tell

display dialog q list name of eachCue as text with title theCurve as text

end repeat

end tell


Where am I making the mistake? Any help pls.

Best,

Kalman

Sam Kusnetz

unread,
Oct 28, 2024, 7:40:13 PM10/28/24
to QLab
Hi Kalman

The reason this doesn’t work is because you’re using UI scripting, which gets and sets information based on what the actual UI is doing. Your repeat loop is looping through a set of cues, but it’s not changing which cue is literally visible in the inspector with each iteration, so the UI scripting part cannot “follow along” with the iteration.

This is one of the many, many limitations of UI scripting.

There is no way to achieve what you’re trying to do here in an efficient way as far as I’m aware. To make it work, you’d need the selection to change on each iteration of the loop, and that would be extremely slow.

Are you building this script to address a design need, or is it simply part of your journey to learn AppleScript? If it’s a design need, we may be able to to help you find another way if you can describe the end goal.

Best
Sam

––
Sam Kusnetz [he/him/his] (what is this?)
Figure 53
https://qlab.app | https://figure53.com
--
Contact support anytime: sup...@figure53.com
Follow QLab on Threads: https://threads.net/@QLabApp
User Group Code of Conduct: https://qlab.app/code-of-conduct/
---
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/a8354d64-55e1-4e2c-9c33-8448792b838en%40googlegroups.com.

Kalman Tarr

unread,
Oct 29, 2024, 4:29:39 AM10/29/24
to QLab
Hi Sam,

Thank you for your quick reply.

I am not a pro scripter, you know.  I just enjoy ti use this language. 
But somtimes I have some idea that I would like to solve.

I would like to solve these problems.
Now, I try to make a CSV file (it is absolutely new for me) that creates a list containing the properties of the cues. After a few attempts, I managed to classify the cues according to their class parameter. This seems to be the most accurate division. I was surprised at how many classes they are in.
When I got to the 'fade' cue, I read out many parameters and came into my mind the curve name. I need to include it in the list. And the problem arised. I use the 'set selected to' command.
However, this significantly slows down the process. I have time, I thought.
However, if you can offer another solution, I will gladly accept it.
I have long wanted to make a complete list of the workspace. (including all cues: cue lists, groups, and other cues included in it, etc)
You asked me, " a design need, or is it simply part of your journey to learn AppleScript?", I think the second option is the correct answer.
Does this preclude you from introducing me to a faster solution?
If not, thaks in advance....

Best regards,
Kalman

Sam Kusnetz

unread,
Oct 29, 2024, 9:24:43 AM10/29/24
to ql...@googlegroups.com
On Oct 29, 2024 at 4:29:39 AM, Kalman Tarr <tarr....@gmail.com> wrote:
You asked me, " a design need, or is it simply part of your journey to learn AppleScript?", I think the second option is the correct answer.
Does this preclude you from introducing me to a faster solution?

It does not preclude me!

But in this case I am not aware of a faster answer. Fade curve shape is not scriptable, so the slower UI scripting method is the only way at this moment.

Sam
Sam Kusnetz (he/him) | Figure 53


Kalman Tarr

unread,
Oct 30, 2024, 6:19:16 AM10/30/24
to QLab
Ok Sam thanks
Reply all
Reply to author
Forward
0 new messages