Copy link to clipboard
Copied
Thanks you reply!
I need done, javascript code. Please share any code
var noneProperties = app.activeDocument.characterStyles.itemByName("[None]").properties;
not working;
Thanks
KS
Discussion branched and moved from InDesign to InDesign Scripting
Copy link to clipboard
Copied
Which version of InDesign do you have and which version of your operating system?
Copy link to clipboard
Copied
InDesing CS6 (ver 8.0) windows 10
Copy link to clipboard
Copied
sk88746243 wrote
Thanks you reply!
I need done, javascript code. Please share any code
var noneProperties = app.activeDocument.characterStyles.itemByName("[None]").properties;
not working;
Thanks
KS
Hi KS,
you posted in the "ordinary" InDesign Forum and did not tell you need a script in your inital post.
The answer is very simple code-wise. Simply assign the first character style in the list of styles to a variable name.
var charStyleNone = app.activeDocument.characterStyles[0];
Question is, if that one has property/value pairs at all?
Check the result of the snippet below in the ESTK:
var charStyleNone = app.activeDocument.characterStyles[0];
var c = 0;
var e;
for( x in charStyleNone )
{
try{
$.writeln( c+"\t"+x +"\t"+ charStyleNone
.toString() ); }catch(e)
{
for( y in e )
{
$.writeln(c+"\t"+"ERROR"+"\t"+y+"\t"+e
.toString() ); }
};
c++
};
FWIW: This thread should be moved over to: InDesign Scripting
Best,
Uwe