Article View: adobe.scripting.indesign
Article #19660Default Text Frame Stroke
From: Dave Saunders
Date: Fri, 29 Nov 2002 02:33
Date: Fri, 29 Nov 2002 02:33
29 lines
1869 bytes
1869 bytes
I've just discovered that the default stroke for a text frame has a 1 point stroke colored "none". This is actually impossible to set up in the UI if you wanted to, but that's what it defaults to. It came up as I was writing a script to shrink text frames vertically. I ended up having to test the color: tell application "InDesign 2.0.1" set oldvertprefs to vertical measurement units of view preferences of document 1 set vertical measurement units of view preferences of document 1 to points set theFrame to item 1 of selection tell theFrame set theBounds to visible bounds of it set theBase to baseline of line -1 of it set theStroke to stroke weight of it set theColor to name of stroke color of it if theColor = "None" then set theStroke to 0 set theInset to inset spacing of text frame preferences of it if class of theInset is list then set theInset to contents of item 3 of theInset end if set item 3 of theBounds to theBase + theStroke + theInset set visible bounds of it to theBounds end tell set vertical measurement units of view preferences of document 1 to oldvertprefs end tell Dave
Technical Details
Message-ID:
<1de6ccd8.-1@WebX.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-04!supernews.com!news.maxwell.syr.edu!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!WebXShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,4bf3056c727fbba3,start X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2002-11-28 18:37:38 PST From: "Dave Saunders" <daves@pdsassoc.com> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-04!supernews.com!news.maxwell.syr.edu!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: Default Text Frame Stroke Message-ID: <1de6ccd8.-1@WebX.la2eafNXanI> Date: Thu, 28 Nov 2002 18:33:37 -0800 Lines: 31 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit