Hi, guys. I confess that I am not a scripter: I have tried and failed (twice). So please can anyone help me writing a small script? This is what I need:
Starting with the cursor type inserted to imediatly to the right of signal +, apply Subscript to the number 2 (that is, to the character immediatly before the last char in the word.
Apply a Character Style to the last char in the word.
Insert the cursor imediatly to the left of the last char and apply -550 kerning unities.
Move the cursor imediatly to the left of and apply 50 kerning unities.
We start with a) and end in b).
My best regards and I thank everybody in advance.
Thank you for your help. It was my mistake: the text in a and in b is equal. The script will apply only formating and kerning.
(The book I am working is a Chemical book and the script is going to help me format a lot of chemical formulas).
app.selection.words.insertionPoints[-2].kerningValue = -550; app.selection.words.insertionPoints[-3].kerningValue = 50; app.selection.words.characters[-1].appliedCharacterStyle = "My Style"; // Change to style name app.selection.words.characters[-2].position = Position.SUBSCRIPT;
This link http://forums.adobe.com/message/4567293#4567293 might be of interest.