Article View: adobe.scripting.indesign
Article #18124Re: Imagewith into variable
From: Richard Ronnback
Date: Thu, 24 Apr 2003 18:23
Date: Thu, 24 Apr 2003 18:23
12 lines
1402 bytes
1402 bytes
Marcus, The follwing will give you the width and height of the currently selected item. Please note that if you are working with metric measurments (millimeters) what you se in the transform palette is actually a rounded number, but the script gives you the actuall size (which you can round if you want to) tell application "InDesign 2.0.2" set myWidth to (item 4 of geometric bounds of selection as number) - (item 2 of geometric bounds of selection as number) set myHeight to (item 3 of geometric bounds of selection as number) - (item 1 of geometric bounds of selection as number) display dialog "It is " & myWidth & " wide and " & myHeight & "tall" end tell
Technical Details
Message-ID:
<1de8d651.2@WebX.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.tpinternet.pl!newsfeed01.sul.t-online.de!t-online.de!WebXReferences:
<1de8d651.-1@WebX.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,73cb70e8c5e089d3 X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-04-24 11:38:06 PST From: "Richard Ronnback" <richard.ronnback@telia.com> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.tpinternet.pl!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: Re: Imagewith into variable Message-ID: <1de8d651.2@WebX.la2eafNXanI> Date: Thu, 24 Apr 2003 11:23:33 -0700 References: <1de8d651.-1@WebX.la2eafNXanI> Lines: 17 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit