🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #17352

Re: Reset transforms to 100%

#17352
From: Olav Kvern
Date: Thu, 12 Jun 2003 22:26
36 lines
2195 bytes
Shane wrote: This stuff makes my head spin. Am I right in suggesting this can all be combined into one script, like so?



tell application "InDesign 2.0.2" 
set myFrame to item 1 of selection 
if class of myFrame is not in {group, table} then 
set theProps to properties of myFrame 
if page item 1 of myFrame exists then 
try 
set myVScale to absolute vertical scale of myPic 
set myHScale to absolute horizontal scale of myPic 
set picBounds to geometric bounds of myPic 
end try 
end if 
--Beware line breaks: Following line should start with "set theProps" and ends with "& theProps" 
set theProps to {absolute vertical scale:nothing, vertical scale:100, absolute horizontal scale:nothing, horizontal scale:100, stroke weight:thePercent * (stroke weight of myprops) / 100, corner radius:thePercent * (corner radius of theProps) / 100} & theProps 
set properties of myFrame to theProps 
try 
--Beware line breaks: Following line should start with "set" and ends with "picBounds}" 
set properties of page item 1 of myFrame to {absolute vertical scale:thePercent * myVScale / 100, absolute horizontal scale:thePercent * myHScale / 100, geometric bounds:picBounds} 
end try 
else if class of myFrame is group then 
transform group contents myFrame 
set textFrames to text frames of (get all page items of myFrame) 
repeat with aFrame in textFrames 
scale text attributes aFrame 
end repeat 
end if 
end tell 




--
Shane Stanley, sstanley@myriad-com.com.au
Technical Details
Message-ID: <1de9579c.21@WebX.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX
References: <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-12 15:38:09 PST
From: "Olav Kvern" <okvern@adobe.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: Re: Reset transforms to 100%
Message-ID: <1de9579c.21@WebX.la2eafNXanI>
Date: Thu, 12 Jun 2003 15:26:59 -0700
References: <1de9579c.-1@WebX.la2eafNXanI>
Lines: 40
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit