Is the superscript applied via style, or manually?
It should be applied via character style but it not always is. So I could kill two birds with one stone, right?
The script here is part of a larger script. It searches for all numbers (using Grep), then makes an array of only superscripted numbers, puts them in order and then finds the gaps. Any gap is a missing number that somebody forgot entirely or just forgot to superscript.
The larger script, however, would hang up on any number such as 193316, where 1933 is a date and 16 is a footnote or endnote.
So I thought if I did a Grep search right from the start for one to 3 digit numbers that are also superscripted, I could that problem. But I can't figure out how to include searching for formatted text inside a Grep search.
app.findGrepPreferences.appliedCharacterStyle.position = Position.SUPERSCRIPT;
app.findGrepPreferences.position = Position.SUPERSCRIPT;
The former tries to search for "any character style which is in superscript", and that's not possible -- you would need to set just the "appliedCharacterStyle" name for that. It gets ignored because you did not supply a name, and thus it finds all numbers, rather than just those in superscript.
The latter fills in "Superscript" in the same place as you would do it in the GUI.
That was the inference of my question...
Thanks! I knew it was something simple. Tom