Create Styles... and then the nesting styles

Seems simple enough:

say application "Adobe InDesign CS5.5.

say active document

put myCharacterStyle to do style of characters with properties {name: 'Year', size: 26.0, fill color: 'Paper', race color: 'Black', race weight: 0.75, fonts: "Helvetica" font style: "Black"}

put myCharacterStyle to do style of characters with properties {name: "Years", size: 18.0, fill color: 'Black', line color:nothing, weight:race nothing, horizontal scale: 80.0, vertical scale: 80.0, fonts: "Helvetica", font style: "Black"}

put myParagraphStyle to do paragraph style with property {name: 'Year'}

put nested styles of myParagraphStyle to {{applied the character style: 'Year', rehearsal: 1, false inclusive: delimiter:any word}, {applied the character style: "Years", rehearsal: 2, inclusive true: delimiter:any word}}

end tell

end tell

The police and the point size do not come through when the style is created. Nested styles are not as through.

I tried the applied policies: "Helvetica" to get "font family is not available. Also: font 'Helvetica '...

What I get just now I is no defined font or size. The rest works.

So what I'm doing wrong here?


Hi lithodora.

as Mary Posner wrote a character style has the property 'do', but 'applied police' and 'make-style ".

«... specified as font family name or an object are.»

just look it up in the dictionary...

Always try to work with references.

Tell application "Adobe InDesign CS5.5"

-You need to myHelvetica your needs!

Set myHelveticas to (font family of each font whose name contains "Helvetica") - returns the helvetica font family names

myHelvetica defined in article 1 of the myHelveticas - just choose randomly one for my example, in the hope there is a 'black' style ;-)...

tell the active document

myCharacterStyle01 to style character with the properties the value {name: 'test', size: 26.0, fill color: 'Paper', race color: 'Black', accident stroke weight: 0.75, applied the police: myHelvetica, font style: "Black"}

myCharacterStyle02 to style character with the property value {name: 'tests', size: 18.0, fill color: 'Black', race color: nothing, stroke cerebral weight: nothing, horizontal scale: 80.0 vertical scale: 80.0, applied the police: myHelvetica, font style: "Black"}

myParagraphStyle to style of paragraph with the properties the value {name: 'nextTest'}

say myParagraphStyle

do new style nested with properties {applied the character style: myCharacterStyle01, repetition: 1, included: false, delimiter: any word}

do new style nested with properties {applied the character style: myCharacterStyle02, repeat: 2, inclusively: true, delimiter: any word}

tell the end

tell the end

tell the end


Tags: InDesign

Similar Questions

Maybe you are looking for