Article View: adobe.scripting.indesign
Article #18671Moving Master Page Items (AS)
From: rob day
Date: Sat, 01 Mar 2003 23:23
Date: Sat, 01 Mar 2003 23:23
30 lines
2042 bytes
2042 bytes
Hi,
I'm writing a script which moves all of the items on a left page .25" left and all of the items on a right page .25" right. I've started with this:
tell application "InDesign 2.0.2"
tell document 1
set zero point to {0, 0}
set myViewPreferences to view preferences
set ruler origin of myViewPreferences to spread origin
set myDocPrefs to document preferences
set myPageH to page height of myDocPrefs
set myPageW to page width of myDocPrefs
repeat with x from 1 to count of every page item
set itemBounds to geometric bounds of page item x
set myTop to item 1 of itemBounds
set myLeft to item 2 of itemBounds
set myBot to item 3 of itemBounds
set myRight to item 4 of itemBounds
if item 4 of itemBounds is less than myPageW + 0.1 then
set the geometric bounds of page item x to {myTop, myLeft - 0.25, myBot, myRight - 0.25}
end if
if item 2 of itemBounds is greater than myPageW - 0.1 then
set the geometric bounds of page item x to {myTop, myLeft + 0.25, myBot, myRight + 0.25}
end if
end repeat
end tell
end tell
I have 2 problems: Master page items which haven't been detached don't move. And the contents of picture frames don't move (the frame gets adjusted correctly).
Any help would be appreciated.
Technical Details
Message-ID:
<1de81833.-1@WebX.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-08!supernews.com!easynet-quince!easynet.net!diablo.theplanet.net!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!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,7331c35b4209206f,start X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-03-01 15:37:33 PST From: "rob day" <vevans@mediaone.net> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-08!supernews.com!easynet-quince!easynet.net!diablo.theplanet.net!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: Moving Master Page Items (AS) Message-ID: <1de81833.-1@WebX.la2eafNXanI> Date: Sat, 1 Mar 2003 15:23:49 -0800 Lines: 36 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit