InDesign Script - find/replace - store in a variable what is in "find what", "find format"
Tested in InDesign, any from CC to CC2020.
I was needed a script which can store whatever is there in one or more variables the following:
- the format from "find format",
- the format from "change format".
The code below doesn't works if the paragraph (character) style is in a group style.
var currFindPrefs = app.findGrepPreferences.properties;
var currChangePrefs = app.changeGrepPreferences.properties;
app.findGrepPreferences.properties = currFindPrefs;
app.changeGrepPreferences.properties = currChangePrefs;
The variables can't store the style that are in group styles.
Only those that are outside of any group.
Please see attached Image.