5 Replies Latest reply on Sep 19, 2014 7:05 AM by Laubender

    Can you help me about this script

    hamdifem Level 1

      I wrote the script in the first frame that always creates

      I want This process the selected paragraph or paragraphs are created in



      var myDocument = app.documents.item (0);

      var myStory = myDocument.stories.item (0);

      var myTable = myStory.insertionPoints.item (-1) .tables.add ();

       

      myTable.columnCount = 6;

      myTable.bodyRowCount = 7;

      myTable.topBorderStrokeWeight = 0;

      myTable.bottomBorderStrokeWeight = 0;

      myTable.leftBorderStrokeWeight = 0;

      myTable.rightBorderStrokeWeight = 0;

      myTable.cells.everyItem () topEdgeStrokeWeight = 0.;

      myTable.cells.everyItem () leftEdgeStrokeWeight = 0.;

       

       

      myTable.cells.everyItem () topInset = 0.;

      myTable.cells.everyItem () leftInset = 0.;

      myTable.cells.everyItem () rightInset = 0.;

      myTable.cells.everyItem () bottomInset = 0.;

       

      myTable.columns.item (1) .cells [0] .bottomEdgeStrokeWeight = 0.5;

      myTable.columns.item (3) .cells [0] .bottomEdgeStrokeWeight = 0.5;

      myTable.columns.item (5) .cells [0] .bottomEdgeStrokeWeight = 0.5;

       

      myTable.cells.everyItem () özellikleri = {Otomatik büyüme: true, genişliği: "10 mm", yükseklik: "5 mm"}.;

      myTable.columns.item (0) .cells [0] .properties = {Otomatik büyüme: true, genişlik: "5 mm", yükseklik: "4 mm"};

      myTable.columns.item (0) .cells [1] .properties = {Otomatik büyüme: true, genişlik: "5 mm", yükseklik: "2 mm"};

      myTable.columns.item (2) .cells [1] .properties = {Otomatik büyüme: true, genişlik: "5 mm", yükseklik: "2 mm"};

      myTable.columns.item (4) .cells [1] .properties = {Otomatik büyüme: true, genişlik: "5 mm", yükseklik: "2 mm"};

      myTable.columns.item (0) .cells [6] .properties = {Otomatik büyüme: true, genişlik: "5 mm", yükseklik: "3 mm"};

       

      myTable.cells [1] .contents = "Ben";

      myTable.cells [3] .contents = "II";

      myTable.cells [5] .contents = "III";

       

      myTable.columns.item (0) .cells [2] = .contents "A)";

      myTable.rows.item (2) .bottomInset = 3;

      myTable.columns.item (0) .cells [3] .contents = "B)";

      myTable.rows.item (3) .bottomInset = 3;

      myTable.columns.item (0) .cells [4] .contents = "C)";

      myTable.rows.item (4) .bottomInset = 3;

      myTable.columns.item (0) .cells [5] .contents = "M)";

      myTable.rows.item (5) .bottomInset = 3;

      myTable.columns.item (0) .cells [6] .contents = "E)";