Copy link to clipboard
Copied
I don't know what its English name is.
So I often can't find it.
Perhaps it should be called TextFrameOptions.
https://www.indesignjs.de/extendscriptAPI/indesign-latest/#ObjectStyle.html
In the English version ID, is what I see on the interface the same as the name in ExtendScript?
Perhaps it's here? But I'm not sure which one.
https://www.indesignjs.de/extendscriptAPI/indesign-latest/#ChangeObjectPreference.html
Copy link to clipboard
Copied
insetSpacing
Copy link to clipboard
Copied
Thanks Peter Kahrel
Thanks
app.documents[0].objectStyles.itemByName(AA).properties =
{
textFramePreferencesInsetSpacing: [6, 0, 0, 0],
Spacing: [6, 0, 0, 0],
}
Neither of these worked.
Can't it be written in the properties?
Is this the only way to write it?
app.documents[0].objectStyles.itemByName(“AA”).textFramePreferences.insetSpacing = [6, 0, 0, 0]
Copy link to clipboard
Copied
Your first code sample doesn't work because AA should be in quotes and the properties should be like this:
app.documents[0].objectStyles.itemByName('AA').properties =
{
textFramePreferences : {insetSpacing: [6, 0, 0, 0]}
}
Your second codde sample doesn't work because you used curly quotes. Use straight quotes and the one-liner works fine.
app.documents[0].objectStyles.itemByName('AA').textFramePreferences.insetSpacing = [6, 0, 0, 0]
Copy link to clipboard
Copied
enableTextFrameGeneralOptions: true,
textFramePreferences: { insetSpacing: [3 * 2.834645, 0, 0, 0] },
textFramePreferences: { insetSpacing: [3 * 2.834645, 0, 0, 0] }, This line seems incorrect.
Does not work when used in properties.
However, it works when used independently below.
app.documents[0].objectStyleGroups.itemByName(capObjGroStn). objectStyles.itemByName(capObjCStn).textFramePreferences.insetSpacing = [3 * 2.834645, 0, 0, 0]
Copy link to clipboard
Copied
Seems right again, must be a line break?
textFramePreferences: {
insetSpacing: [3 * 2.834645, 0, 0, 0],
}
Find more inspiration, events, and resources on the new Adobe Community
Explore Now