1 person found this helpful
My applescript is very rusty, but I vaguely recall some limitations to the "whose" clauses that often forced me to work around them. If that's what you've bumped into here, try looping thru all the of text style ranges in thetext to find the ones that use the character styles you're hunting.
I was hoping that was not the case, only because of the speed it would go.
I'm wondering about the syntax, too. Should it be:
(every character of thetext whose name of applied character style is not "header" or
whose name of applied character style is not "price")
Again, just off the top of my head. I don't have an AS editor handy.
I'll give it a try in the morning. I think I did, but it is worth a shot.
I could do it in JS though... I've been trying to write more in JS but I'm faster at AS.
For a big document for speed if you are not using conditional text then you can set all text to condition "A" then use a grep to set styles 1 & 2 to condition "B" then use a grep to change condition "A" to the desired style and then reset all the text to any conditions.