var sel = app.activeDocument.selection;
for (i = 0; i < sel.characters.length; i++ ){
var character = sel.characters[i];
alert(character)
if(character == "1")
{
character.characterAttributes.baselinePosition = FontBaselineOption.SUPERSCRIPT;
}
}
I have this script that is supposed to replace every 1 with a superscript 1. The superscript part works but the if statement that compares the character to "1" doesn't. Can anyone help me?