Article View: adobe.scripting.indesign
Article #17961Re: (AS) Adding Text Frames to a page in InDesign
From: Olav Kvern
Date: Wed, 30 Apr 2003 21:27
Date: Wed, 30 Apr 2003 21:27
41 lines
1793 bytes
1793 bytes
John--
I think it's your ruler origin setting that's messing you up. Try this:
tell application "InDesign 2.0.2"
set myDocument to make document
set ruler origin of view preferences of myDocument to page origin
repeat with myCounter from 1 to 8
if myCounter is not equal to 1 then
tell myDocument to make page at end
end if
my MakeTextBox(1, 4, 4, 18, 18)
end repeat
end tell
--start code
on MakeTextBox(BoxNumber, TopCoord, LeftCoord, RightCoord, BottomCoord)
local PageCount
tell application "InDesign 2.0.2"
set CurDoc to active document
tell CurDoc
activate
tell last page
set CurrentFrame to make text frame
set MyFrameProperties to properties of CurrentFrame
tell CurrentFrame to move by {1, 1}
set properties of CurrentFrame to {geometric bounds:{TopCoord, LeftCoord, BottomCoord, RightCoord}, label:BoxNumber}
end tell
end tell
end tell
end MakeTextBox
---end code
Thanks,
Ole
Technical Details
Message-ID:
<1de8f1b6.0@WebX.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!newsswitch.lcs.mit.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!WebXReferences:
<1de8f1b6.-1@WebX.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,3219ea3e06fa079b X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-04-30 14:38:04 PST From: "Olav Kvern" <okvern@adobe.com> Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!newsswitch.lcs.mit.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: Re: (AS) Adding Text Frames to a page in InDesign Message-ID: <1de8f1b6.0@WebX.la2eafNXanI> Date: Wed, 30 Apr 2003 14:27:11 -0700 References: <1de8f1b6.-1@WebX.la2eafNXanI> Lines: 38 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit