text alignment prop

98 views
Skip to first unread message

Kalman Tarr

unread,
Nov 9, 2025, 4:19:34 AM11/9/25
to QLab
Hi pros,

Remembering an old question. Resizing and coloring the 'notes' field of a cue.

When copying the text field style in the scroll area of ​​an existing text cue text tab, the text alignment property will not be included in the package. ("Copy Style" of menu 1)

set text format of dummyCue to notesFormatRecord

set text alignment of dummyCue to "left"


I mean when I paste this into a notes field, for example, it will not set the 'text alignment' property. ("Paste Style" of menu 1).
Am I doing something wrong or is this the case? The entire text must be copied and transferred to the notes field of another cue.
I hope my problem is understandable.

Best,
Good Sunday
Kalman

Rich Walsh

unread,
Nov 9, 2025, 11:44:30 AM11/9/25
to ql...@googlegroups.com
Start with the AppleScript dictionary…

The “cue" class contains a property “notes” of class “text”; it does not contain any properties that mention “alignment” or “text format record”: https://qlab.app/docs/v5/scripting/applescript-dictionary-v5/#cue:~:text=is “any channel”.-,notes,-get/set. You can not set the formatting of the notes field in any direct way using AppleScript – if you could, there would be an entry for how to do it in the properties of the cue class.

The “text cue” class , however, does contain a property “text format”: https://qlab.app/docs/v5/scripting/applescript-dictionary-v5/#text-cue:~:text=right%E2%80%9D%2C%20and%20%E2%80%9Cjustify%E2%80%9D.-,text%20format,-get/set. This returns a “text format record”: https://qlab.app/docs/v5/scripting/applescript-dictionary-v5/#text-format-record. This record does not include a key for alignment as the “text cue” class handles this separately in the “text alignment" property: https://qlab.app/docs/v5/scripting/applescript-dictionary-v5/#text-format-record:~:text=of%20this%20cue.-,text%20alignment,-get/set.

If you want to programatically format the notes field you will probably have to create a dummy text cue, format that and then copy and paste the text using UI scripting.

Rich

Kalman Tarr

unread,
Nov 11, 2025, 10:18:39 AM11/11/25
to QLab
Thank you Rich,
I understood.
Kalman

Kalman Tarr

unread,
Jan 21, 2026, 4:47:15 AM (13 days ago) Jan 21
to QLab
Hi Rich,
Some months ago you offered me a do shell script solution to format the notes field text contents on any cue.
It is contains prefix , suffix and the do shel script itself.

set htmlPrefix to "<head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"/></head><body style=\"color:yellow;font-size:24px;font-family:'Comic Sans MS'\">" 

set htmlSufffix to "</body>"

do shell script "echo " & quoted form of (htmlPrefix & notes of eachCue & htmlSufffix) & " | textutil -convert rtf -stdin -stdout | pbcopy -Prefer rtf"

My question is the next: how can we embed the text align parameter in prefix line??? Or it is possible or not?
I would be happy to use this form!
Thanks so much for your reply, Rich.

Best:
Kalman

Rich Walsh

unread,
Jan 21, 2026, 5:32:58 AM (12 days ago) Jan 21
to ql...@googlegroups.com
It was almost exactly 3 years ago, and if you look at the final version you will see a link to all the style object properties you could use in your html construct: https://groups.google.com/g/qlab/c/zAerQV8yLR4/m/q0n08nuaBQAJ.

There shouldn’t be any problem in principle with including “;text-align:centre” in the userStyle variable. (I think it’s the “CSS form” of the property you need to use.)

All this script is doing is wrapping the existing notes in some html tags and converting the resulting html to rtf on the clipboard to then paste it back to QLab. Anything you can do in html that can be converted to rtf should work.

Rich

Kalman Tarr

unread,
Jan 21, 2026, 7:48:56 AM (12 days ago) Jan 21
to QLab
Hi Rich,

You are right as always. I was careless. I checked the given link.
I was scared by the significantly larger script. I thought expanding the prefix would solve the problem. ok
Everything is clear now
Thanks again
Kalman
Reply all
Reply to author
Forward
0 new messages