Article View: adobe.scripting.indesign
Article #17419Re: Reset transforms to 100%
From: rob day
Date: Tue, 10 Jun 2003 14:07
Date: Tue, 10 Jun 2003 14:07
30 lines
2233 bytes
2233 bytes
Kenny,
Glad to see I not alone in being driven crazy by the transforms. I adapted Shane's script so that the stroke, corner radius and content is visually the same after the frame is set back to 100%. I'm sure to get this to work on groups you would have to step through the items in the group:
tell application "InDesign 2.0.2"
set myFrame to item 1 of selection
set theProps to properties of myFrame
set thePercent to vertical scale of myFrame
set theRadius to the corner radius of myFrame
set theStroke to the stroke weight of myFrame
if image 1 of myFrame exists then
set myPic to image 1 of myFrame
set myVScale to absolute vertical scale of myPic
set myHScale to absolute horizontal scale of myPic
set picBounds to geometric bounds of myPic
end if
set theProps to {absolute vertical scale:nothing, vertical scale:100, absolute horizontal scale:nothing, horizontal scale:100} & theProps
set properties of myFrame to theProps
set the stroke weight of myFrame to thePercent * theStroke / 100
set the corner radius of myFrame to thePercent * theRadius / 100
if image 1 of myFrame exists then
set the absolute vertical scale of myPic to thePercent * myVScale / 100
set the absolute horizontal scale of myPic to thePercent * myHScale / 100
set the geometric bounds of myPic to picBounds
end if
end tell
Rob
Technical Details
Message-ID:
<1de9579c.11@WebX.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!38.144.126.75.MISMATCH!feed1.newsreader.com!newsreader.com!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!proxad.net!proxad.net!skynet.be!skynet.be!newsfeed.tpinternet.pl!newsfeed01.sul.t-online.de!t-online.de!WebXReferences:
<1de9579c.-1@WebX.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,3645d1b4a9bc81d1 X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-06-10 07:08:24 PST From: "rob day" <vevans@mediaone.net> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!38.144.126.75.MISMATCH!feed1.newsreader.com!newsreader.com!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!proxad.net!proxad.net!skynet.be!skynet.be!newsfeed.tpinternet.pl!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: Re: Reset transforms to 100% Message-ID: <1de9579c.11@WebX.la2eafNXanI> Date: Tue, 10 Jun 2003 07:07:09 -0700 References: <1de9579c.-1@WebX.la2eafNXanI> Lines: 36 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit