Skip to main content
dublove
Legend
October 24, 2026
Answered

How to use a script to select some text in a continuous column and then convert it to select all the text in these columns?

For example, my story has 4 text boxes, each with 2 columns.
When I select some of the text in columns 2-4, I want to use a script to select all the text in columns 2-4.

The green color in the sample represents the selected text

    Peter Kahrel
    Peter KahrelCorrect answer
    Community Expert
    October 24, 2026

    You should familiarise yourself with the textColumn object and the itemByRange() function. Many of your questions are about that.

    app.selection[0].parentStory.textColumns.itemByRange (
    app.selection[0].textColumns[0],
    app.selection[0].textColumns[-1])
    .select();

     

    9 replies

    dublove
    dubloveAuthor
    Legend
    October 25, 2026

    I have been restricted from speaking again.
    Am I a bad person?
    Or am I just pouring water?

    Translate
    Peter Kahrel
    Community Expert
    Peter KahrelCommunity ExpertCorrect answer
    Community Expert
    October 24, 2026

    You should familiarise yourself with the textColumn object and the itemByRange() function. Many of your questions are about that.

    app.selection[0].parentStory.textColumns.itemByRange (
    app.selection[0].textColumns[0],
    app.selection[0].textColumns[-1])
    .select();

     

    Translate
    m1b
    Community Expert
    Community Expert
    October 24, 2026

    Beautiful! I’m so glad you posted this before I posted my ~70 line monstrosity! :)

    Translate