🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #17436

Re: Reset transforms to 100%

#17436
From: Shane Stanley
Date: Wed, 11 Jun 2003 23:27
35 lines
2215 bytes
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
  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
   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: <BB0DF7FE.5C6E1%sstanley@myriad-com.com.au>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!newsfeed.gamma.ru!Gamma.RU!news.tele.dk!news.tele.dk!small.news.tele.dk!proxad.net!newsfeed.tpinternet.pl!newsfeed01.sul.t-online.de!t-online.de!WebX
References: <1de9579c.-1@WebX.la2eafNXanI> <1de9579c.16@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-11 16:38:08 PST
From: Shane Stanley <sstanley@myriad-com.com.au>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!newsfeed.gamma.ru!Gamma.RU!news.tele.dk!news.tele.dk!small.news.tele.dk!proxad.net!newsfeed.tpinternet.pl!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: Re: Reset transforms to 100%
Message-ID: <BB0DF7FE.5C6E1%sstanley@myriad-com.com.au>
Date: Wed, 11 Jun 2003 16:27:26 -0700
References: <1de9579c.-1@WebX.la2eafNXanI> <1de9579c.16@WebX.la2eafNXanI>
Lines: 37
User-Agent: Microsoft-Outlook-Express-Macintosh-Edition/5.0.6
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit