• "All Caps" option turn "ON" by default when (Java)scripting a textfield… Why? How to avoid?
Hello -
I made an Adobe Illustrator Javascript,
To summarize it, it "copy-paste" some values/data from a .csv file.
With one of the textfield, I don't know why but the "All Caps" option/setting (from the "Character" palette is turn on.
I don't know only why that specific textfield.
tried already a lot of thinngs… But I dn't understand why.
Would it be possible to avoid it by turnning "off" that option via Javascript?
Can this option (so from the "Character" palette be "reach" via Javascript?
Below in this message I saw already some stuff, but nothing seems to work.

I tried it via:
var textRange_DC = textFrame_DC.textRange;
textRange_DC.characterAttributes.allCaps = false;
textRange_DC.characterAttributes.capitalization = Capitalization.NORMAL;
but it doesn't work,
After I tried something like:
// Try to turn off All Caps using the menu command
app.executeMenuCommand("allCaps");
// Try to change to lowercase and then back to original case
// First, store the original content
var originalContent_DC = textFrame_DC.contents;
// Change to lowercase
app.executeMenuCommand("lowercase");But it didn't work neither…
May be via a temporary "action" ceated on the fly.
But then the question, which "parameter" is "All Caps"? Since they are 18 parameters (in a "handmade" action when I clic that option)
Stuff that I have found, but it doesn't seem toi help.
FontCapsOption.ALLCAPS | All Caps |
FontCapsOption.ALLSMALLCAPS | All Smallcaps |
FontCapsOption.NORMALCAPS | Normal Caps |
FontCapsOption.SMALLCAPS | Small Caps |
EDIT:
Wanted to also add. The above is a display change to the text. The text may internally be set as "Lorem Ipsum" but changed to display setting as All Caps would display as "LOREM IPSUM" while maintaining the internal text as "Lorem Ipsum". To access the Change case functionality you can either do a heavier coding approach to change the text contents or use the executeMenuCommand to access those commands.
https://ten-artai.com/illustrator-ccver-22-menu-commands-list/
app.executeMenuCommand("UpperCase Change Case Item")
app.executeMenuCommand("LowerCase Change Case Item")
app.executeMenuCommand("Title Case Change Case Item")
app.executeMenuCommand("Sentence case Change Case Item")
