Skip to main content
dublove
Legend
Nov 27, 2026 4:06 AM UTC
Answered

How to move the caption of a caption down to 0 by script?

I have an English version now, but I still can't find this one.

 

    rob day
    rob dayCorrect answer
    Community Expert
    Nov 27, 2026 3:19 PM UTC

    Hi ​@dublove , After creating the caption you could set the textFrame’s insetSpacing to  0 via textFramePreferences:

     

    //selection is the image container rectangle
    var s = app.activeDocument.selection[0]
    //invoke caption menu action
    var makeCap = app.menuActions.itemByName("Generate Live Caption")
    makeCap.invoke();
    //select the newly created caption text frame—textFrames[0]
    var c = app.activeDocument.textFrames[0];
    app.select(c)
    //set the text frame’s insetSpacing to 0
    c.textFramePreferences.insetSpacing = 0

     

    Before and after

     

     

     

     

    2 replies

    rob day
    Community Expert
    rob dayCommunity ExpertCorrect answer
    Community Expert
    Nov 27, 2026 3:19 PM UTC

    Hi ​@dublove , After creating the caption you could set the textFrame’s insetSpacing to  0 via textFramePreferences:

     

    //selection is the image container rectangle
    var s = app.activeDocument.selection[0]
    //invoke caption menu action
    var makeCap = app.menuActions.itemByName("Generate Live Caption")
    makeCap.invoke();
    //select the newly created caption text frame—textFrames[0]
    var c = app.activeDocument.textFrames[0];
    app.select(c)
    //set the text frame’s insetSpacing to 0
    c.textFramePreferences.insetSpacing = 0

     

    Before and after

     

     

     

     

    Translate
    Community Expert
    Nov 27, 2026 4:45 AM UTC

    That is not available to scripting it seems

    Translate
    -Manan