Article View: adobe.scripting.indesign
Article #17126Re: Resetting a frame to a default shape
From: CouponBoy
Date: Mon, 07 Jul 2003 16:47
Date: Mon, 07 Jul 2003 16:47
40 lines
2424 bytes
2424 bytes
So I whipped this up quick and it works nice, I think it does what I need it to, and will delete extra points from the shape.
tell application "InDesign 2.0.2"
set mySelection to selection
set myBounds to geometric bounds of selection
set myTop to item 1 of myBounds
set myLeft to item 2 of myBounds
set myBot to item 3 of myBounds
set myRight to item 4 of myBounds
set myPath to path 1 of item 1 of mySelection
set myPoints to count of path points of myPath
set anchor of path point 1 of myPath to {myLeft, myTop}
set point type of path point 1 of myPath to corner
set left direction of path point 1 of myPath to {myLeft, myTop}
set right direction of path point 1 of myPath to {myLeft, myTop}
set anchor of path point 2 of myPath to {myLeft, myBot}
set point type of path point 2 of myPath to corner
set left direction of path point 2 of myPath to {myLeft, myBot}
set right direction of path point 2 of myPath to {myLeft, myBot}
set anchor of path point 3 of myPath to {myRight, myBot}
set point type of path point 3 of myPath to corner
set left direction of path point 3 of myPath to {myRight, myBot}
set right direction of path point 3 of myPath to {myRight, myBot}
set anchor of path point 4 of myPath to {myRight, myTop}
set point type of path point 4 of myPath to corner
set left direction of path point 4 of myPath to {myRight, myTop}
set right direction of path point 4 of myPath to {myRight, myTop}
repeat (myPoints - 4) times
delete path point 5 of myPath
end repeat
end tell
Chris
Technical Details
Message-ID:
<1de9c5ff.2@WebX.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-08!supernews.com!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!kibo.news.demon.net!demon!skynet.be!skynet.be!news.tele.dk!news.tele.dk!small.news.tele.dk!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebXReferences:
<1de9c5ff.-1@WebX.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,cd54cee4fda94831 X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-07-07 10:07:55 PST From: CouponBoy <chris.paveglio@clippermagazine.com> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-08!supernews.com!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!kibo.news.demon.net!demon!skynet.be!skynet.be!news.tele.dk!news.tele.dk!small.news.tele.dk!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: Re: Resetting a frame to a default shape Message-ID: <1de9c5ff.2@WebX.la2eafNXanI> Date: Mon, 7 Jul 2003 09:47:06 -0700 References: <1de9c5ff.-1@WebX.la2eafNXanI> Lines: 41 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit