Article View: adobe.scripting.indesign
Article #19638Adding tabs to beginning of paragraphs
From: mattb
Date: Wed, 04 Dec 2002 20:27
Date: Wed, 04 Dec 2002 20:27
24 lines
1644 bytes
1644 bytes
I'm trying to add a tab to the beginning of every paragraph of a text frame.
tell application "InDesign 2.0.1"
set myDocument to active document
tell myDocument
set myPageHeight to page height of document preferences
set mynewFrame to make text frame with properties {geometric bounds:{"3p0", "3p0", myPageHeight, "48p0"}}
set properties of myXMLElement to {associated object:mynewFrame}
set myTextObjects to {insertion point, character, word, line, text style range, text, paragraph, text column}
set myText to item 1 of mynewFrame
set myText to object reference of item 1 of mynewFrame
set myParas to object reference of every paragraph of mynewFrame
set n to count of myParas
set myTab to tab
repeat with x from 1 to n
set contents of insertion point of paragraph x of myText to myTab
end repeat
end tell
end tell
This script adds a tab to the beginning of every other line and deletes the lines in between. Can someone tell me what I am doing wrong?
Thanks,
Matt
Technical Details
Message-ID:
<1de6df1c.-1@WebX.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-04!supernews.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebXShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,51e9177ea9be9f00,start X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2002-12-04 12:38:05 PST From: mattb <tim@tim.com> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-04!supernews.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: Adding tabs to beginning of paragraphs Message-ID: <1de6df1c.-1@WebX.la2eafNXanI> Date: Wed, 4 Dec 2002 12:27:25 -0800 Lines: 28 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit