Copy link to clipboard
Copied
Hi friends,
Just, I need to select "characterStyles panel [none]". Here with i have search properties for select option. But, not there.
Please suggest friends!
Thanks
SK
Window > Styles > Character Styles (see screen shot); If it doesn't appear reset your InDesign Preferences.
Copy link to clipboard
Copied
Window > Styles > Character Styles (see screen shot); If it doesn't appear reset your InDesign Preferences.
Copy link to clipboard
Copied
Hi SK,
don't know if something went wrong by moving the thread over to InDesign Scripting.
I already replied to your question how to address character style named [None]. I will repeat my answer here:
var charStyleNone = app.activeDocument.characterStyles[0];
var c = 0;
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++
};
The snippet above tries to list property/value pairs of Character Style [None]. Run it from the ESTK. It will return also some error messages. All messages, not only the error ones are listed in the JavaScript Console of the ESTK.
You'll find, that the value of most properties is: NOTHING
Here an excerpt from the result when run against an InDesign CC 2018.1 document as the active one. From my German InDesign.
A message like: "Ungültige Anforderung für Stammformat." points at: $ID/InvalidRequestForRootStyleError
/*
0 imported false
1 ERROR number 516
1 ERROR fileName (Script1)
1 ERROR line 8
1 ERROR source var charStyleNone = app.activeDocument.characterStyles[0];
var c = 0;
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++
};
1 ERROR start -1
1 ERROR end -1
1 ERROR message Ungültige Anforderung für Stammformat.
1 ERROR name Error
1 ERROR description Ungültige Anforderung für Stammformat.
2 appliedFont
3 fontStyle NOTHING
4 pointSize NOTHING
5 leading NOTHING
6 kerningMethod NOTHING
7 tracking NOTHING
8 capitalization NOTHING
9 position NOTHING
10 underline NOTHING
11 strikeThru NOTHING
12 ligatures NOTHING
13 noBreak NOTHING
14 horizontalScale NOTHING
15 verticalScale NOTHING
16 baselineShift NOTHING
17 skew NOTHING
18 fillTint NOTHING
19 strokeTint NOTHING
20 strokeWeight NOTHING
21 overprintStroke NOTHING
22 overprintFill NOTHING
23 otfFigureStyle NOTHING
24 otfOrdinal NOTHING
25 otfFraction NOTHING
26 otfDiscretionaryLigature NOTHING
27 otfTitling NOTHING
28 otfContextualAlternate NOTHING
29 otfSwash NOTHING
30 ERROR number 21
30 ERROR fileName (Script1)
30 ERROR line 8
30 ERROR source var charStyleNone = app.activeDocument.characterStyles[0];
var c = 0;
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++
};
30 ERROR start 0
30 ERROR end 0
30 ERROR message null is not an object
30 ERROR name TypeError
30 ERROR description null is not an object
31 ERROR number 21
31 ERROR fileName (Script1)
31 ERROR line 8
31 ERROR source var charStyleNone = app.activeDocument.characterStyles[0];
var c = 0;
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++
};
31 ERROR start 0
31 ERROR end 0
31 ERROR message null is not an object
31 ERROR name TypeError
31 ERROR description null is not an object
32 underlineTint NOTHING
33 underlineGapTint NOTHING
34 underlineOverprint NOTHING
35 underlineGapOverprint NOTHING
…
122 rubyFontStyle NOTHING
123 rubyFontSize NOTHING
124 rubyOpenTypePro NOTHING
125 rubyXScale NOTHING
126 rubyYScale NOTHING
127 rubyType NOTHING
128 rubyAlignment NOTHING
129 rubyPosition NOTHING
130 rubyXOffset NOTHING
131 rubyYOffset NOTHING
132 rubyParentSpacing NOTHING
133 rubyAutoAlign NOTHING
134 rubyOverhang NOTHING
135 rubyAutoScaling NOTHING
136 rubyParentScalingPercent NOTHING
137 rubyParentOverhangAmount NOTHING
138 warichu NOTHING
139 warichuSize NOTHING
140 warichuLines NOTHING
141 warichuLineSpacing NOTHING
142 warichuAlignment NOTHING
143 warichuCharsAfterBreak NOTHING
144 warichuCharsBeforeBreak NOTHING
145 otfProportionalMetrics NOTHING
146 otfHVKana NOTHING
147 otfRomanItalics NOTHING
148 scaleAffectsLineHeight NOTHING
149 cjkGridTracking NOTHING
150 glyphForm NOTHING
151 rubyAutoTcyDigits NOTHING
152 rubyAutoTcyIncludeRoman NOTHING
153 rubyAutoTcyAutoScale NOTHING
154 id 118
155 label
156 isValid true
157 parent [object Document]
158 index 0
159 properties [object Object]
160 styleExportTagMaps [object StyleExportTagMaps]
161 events [object Events]
162 eventListeners [object EventListeners]
163 isValid true
*/
Regards,
Uwe
Find more inspiration, events, and resources on the new Adobe Community
Explore Now