Copy link to clipboard
Copied
if ( mesPara.characters[0].contents == 1396862068 || mesPara.characters[0].contents == '\u00B7' && leStyleOK == false) {// if Niv 02.2
// routine
mesPara.characters[0].contents = '\u25CF';
}
Someone an idea thank you
Copy link to clipboard
Copied
Hi Philippe,
I tried something like this with a minimal code like this and it worked:
var myUnicodeString = "\u00B7";
var myNewUnicodeString = "\u25CF";
//Text frame selected:
var myText = app.selection[0];
var myParagraphs = myText.paragraphs.everyItem().getElements();
for(var n=0;n<myParagraphs.length;n++){
if(myParagraphs
.characters[0].contents === myUnicodeString){ myParagraphs
.characters[0].contents = myNewUnicodeString; };
};
Before running the snippet (the left text frame), after running the snippet (the right text frame):
Font: Mistral Regular
Tested with InDesign CS5.5 on Mac OSX 10.6.8.
Maybe we need the whole picture code wise with some explanations on how your document is built and how your paragraph style and character style is built? Used fonts?
Uwe
Copy link to clipboard
Copied
Thank you for your reply, I come back to this issue soon I test result
Find more inspiration, events, and resources on the new Adobe Community
Explore Now