1 person found this helpful
From the JS help: it's called a NestedGrepStyle, and can be added to a paragraph (and other text objects -- but I bet it's applied on the entire paragraph) or to a paragraph style.
For once, no surprises in its properties: appliedCharacterStyle and grepExpression seem that's all needed.
Yep, know about Nested Grep Style.
If I have a P-style in a document, with a nested grep style applied. I can read and write to that grep style by calling it:
nested grep style 1 of paragraph style "myParaStyle"
read: grep expression of ... -- -- -- -- -- -- -- Where ... is the above line
write: set grep expression of ... to "xyz"
However, if the P-style doesn't have a nested grep style applied, I can't find a way to create/insert one into the P-style.
g = app.documents.paragraphStyles.item ("par").nestedGrepStyles.add ();
g.appliedCharacterStyle = app.documents.characterStyles.item ("smallcaps");
g.grepExpression = "\\u\\u+";
If you can find the AppleScript equivalent you're home and dry.
Thanks Peter & [Jongware]
Peter, your right on spot!
And, the AS solution was waaay easier than I thought it would. Silly.
It's basically just...
tell paragraph style "par"
make new nested grep styleend tellThanks again both!