Copy link to clipboard
Copied
changeToArrow();
function changeToArrow(){
replaceText('_MID_ROW_UP','@#!','<25B2>');
replaceText('_MID_ROW_NoChange','#@!','—');
replaceText('_MID_ROW_DOWN','!#@','<25BC>');
}
function replaceText(a_char_style,a_find_what,a_change_to){
app.findChangeTextOptions = NothingEnum.nothing;
app.findTextPreferences = NothingEnum.nothing;
app.changeTextPreferences.appliedCharacterStyle = document.characterStyles.item(a_char_style);//_MID_ROW_DOWN
app.findTextPreferences.findWhat = a_find_what;//down-arrow(!#@)
app.changeTextPreferences.changeTo =a_change_to;//<25BC>
app.findChangeTextOptions.includeFootnotes = false;
app.findChangeTextOptions.includeHiddenLayers = false;
app.findChangeTextOptions.includeMasterPages = false;
app.findChangeTextOptions.includeLockedStoriesForFind = false;
app.findChangeTextOptions.includeLockedLayersForFind = false;
var results = app.changeText(false);//In this line InDesign is cushing..
}
Any one know the reason behind it?
Copy link to clipboard
Copied
The error is probably a few lines earlier:
app.findChangeTextOptions = NothingEnum.nothing;
You can't set options to zero, you have to set them to true or false, as in
app.findChangeTextOptions.includeFootnotes = true;
Peter
Copy link to clipboard
Copied
Hi Peter,
I have changed the code according to you. But it didn't work.
Thanks,
Mrinmoy