Copy link to clipboard
Copied
Hi,
I have a plugin developed for InDesign (C++). I have noted a strange behaviour in scripting, when the plugin is placed. When accessed from the script, it returns RIGHT for the return value of Justification.RIGHT_ALIGN where it should be RIGHT_ALIGN. This happens only in InDesign 2025.
When I compile the same pluing (same c++ code) for InDesign 2023 or InDesign 2024 and try to access it, it returns the correct value.
Does someone has an idea what could be going wrong in my c++ code?
Just the precense of the C++ plugin modifies the return value.
1 Correct answer
Does your plugin's scriptinfo .fr use en_right with the four-char code 'rght' ?
If you used en_right 'rght' = "right" for an own enumeration value or property, you changed that mapping for everything else.
That enum value is used for "right align" script names all over the place. As you found kJustificationEnumScriptElement "justification", but also kParagraphAlignEnumScriptElement "single word justification", kTabStopAlignmentEnumScriptElement "tab stop alignment" and so forth.
So "en_right" is a
...Copy link to clipboard
Copied
Does your plugin's scriptinfo .fr use en_right with the four-char code 'rght' ?
If you used en_right 'rght' = "right" for an own enumeration value or property, you changed that mapping for everything else.
That enum value is used for "right align" script names all over the place. As you found kJustificationEnumScriptElement "justification", but also kParagraphAlignEnumScriptElement "single word justification", kTabStopAlignmentEnumScriptElement "tab stop alignment" and so forth.
So "en_right" is a misleading choice for that identifier. Better don't back-guess the name from the en_ … .
The header comment in ScriptingDef.h hints to AppleScript kAERightJustified, maybe they made the value compatible but got more specific with the name. Could also have been a collision with p_Right = 'marr' which indeed maps to "right", but for use in the margin preferences property. It was only later also used for an obscure DPS-related enum.
As a reminder, once upon a time there was an online database to allocate script IDs, but that was killed because it was located on an old server, it used an old css not matching then-modernized corporate ID, or nobody knew it was used any more. The replacement mechanism is to negotiate/allocate script IDs via mail to wwds at adobe . com. Beyond avoiding such collisions, this is important as such names also become part of persistence in IDML / IDMS and so forth.
You should also have found the collision with the debug build.
Copy link to clipboard
Copied
Thank you so much Dirk. You saved me a lot of time.
We have used en_right 'rght' = "right" for our own enumeration value. Some how it didn't matter until InDesign 2025.

