Script for Indesign Tables (Javascript)

Asked

Viewed 133 times

1

I created a script for Indesign using Javascript, however I am not able to create a last command to complete it:

myTable ();


function myTable(){
      app.selection[0].tables.everyItem().appliedTableStyle = "Tabela";

        var    
            mCols = app.activeDocument.textFrames[0].tables[0].columns[-1],
            mTarget = mCols.cells.everyItem().texts.everyItem().getElements(),
            len = mTarget.length;  
        while (len-->0)
            mTarget[len].tabStops.add({  
              alignment: TabStopAlignment.CHARACTER_ALIGN,
              alignmentCharacter: ",",
              position: mCols.width -10
            }); 
        alert("Script myTable");
}

This script of mine gives me this resulting:

inserir a descrição da imagem aqui

But I need the "R$" to line up too.

  • Put HTML here, not a pf image.

  • 1

    include the code and not a picture of it in your question

  • The "last command" you are talking about, is the alignment of "R$" with the "Item number" ?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.