Legend
October 16, 2026
Answered
How to choose one line more (or less) than before?
- 2 replies
- 25 views
- Translate
I have selected some text (such as 9 lines) and I want to use a script to adjust the line spacing.
After adjusting the line spacing with the script, how can I add one more line (such as 10 lines) than before?
var d = app.activeDocument;
var item = app.selection[0];
oLinesNum = item.lines.length;
//do something
item.texts[0].leading = 16 - 1;
//Retrieve the selection with one less row
//like this
app.select(oLinesNum + 1)
