Copy link to clipboard
Copied
I want to find any English character (upper & lower case) and apply a certain existing character style.
In the list - I have wrote:
grep | {findwhat:"\u|\l"} | {changeTo:"", applycstyle: EnglishTosefet} |
"EnglishTosefet" is of-course the name of the character style.
The error massage seems to refer to the name of the character style as if it is wrong, but this is an existing character style and its name is written correctly.
Is the code written correctly?
Copy link to clipboard
Copied
Make sure your character style are not in STYLE GROUP..
Just post your character style panel screenshot
Copy link to clipboard
Copied
Hi. As can seen - the character style is not part of a group
Copy link to clipboard
Copied
use appliedCharacterStyle method..
I hope you are using FindChangeList.txt what we are getting from Indesign inbuild
grep | {findwhat:"\u|\l"} | {changeTo:"$0"} {appliedCharacterStyle: "EnglishTosefet"} |
Copy link to clipboard
Copied
Try this also
grep | {findwhat:"\u|\l"} | {changeTo:"$0", appliedCharacterStyle: "EnglishTosefet"} {} |
Copy link to clipboard
Copied
Hello. some progress, but not really...: I do not receive an error massage, but nothing in the document changes.
Copy link to clipboard
Copied
It is easy to run the script as jsx format.. not sure why you still using FindChangeList.txt !!!
Try this code.. it dont need FindChangeList.txt
app.findGrepPreferences = null; app.changeGrepPreferences = null;
app.findGrepPreferences.findWhat="\\u|\\l";
app.changeGrepPreferences.appliedCharacterStyle = "EnglishTosefet";
app.changeGrep();
Copy link to clipboard
Copied
Hi. Thanks for your concern, but I DO NOT HAVE PROBLEM doing this as a separate action. I am using this find\replace for a long time as a separate action (see pic attached of the xml that indesign makes when you save a find\replace action). The problem occured when I tried to insert this to the list.