Article View: adobe.scripting.indesign
Article #20179Re: [VB] Nudging an inline frame
From: Dave Saunders
Date: Mon, 28 Oct 2002 12:46
Date: Mon, 28 Oct 2002 12:46
23 lines
2276 bytes
2276 bytes
As for the second part of your problem. There are two ways to move an inline graphic relative to the baseline. One is to drag it with the mouse, the other is to select with the text tool and adjust the baseline offset. The problem with doing this from a script is that there is no direct way of determining the amount it's been dragged by the mouse. And, to add fuel to the situation, there's also a bunch of things that can cause an implicit mouse-drag. The way I've solved this in the past is to eliminate the "mouse-dragging" and then use baseline offset to position the frame where I want it. To do this, you need to: 1. Get the baseline y-coordinate of the line of text holding the inline 2. Make sure that the baseline offset of the character contain the inline is zero 3. Set the visible bounds of the inline so that it is sitting on the baseline (you might be able to use the Move command to do this) 4. Set the baseline offset of the graphic to the desired amount. Step 4 can be encapsulated in a character style, so if you need to do this to a lot of same-sized inline graphics, you can just apply the character style to it. But it is important to make sure that any "mouse-dragging" is eliminated from the position of the graphic before applying the character style. I hope this make sense. Drove me batty the first time I had to deal with it. I'd share my scripts, but I'm a Mac user, so they're AppleScript. Dave
Technical Details
Message-ID:
<1de65841.3@WebX.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!proxad.net!proxad.net!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!WebXReferences:
<1de65841.-1@WebX.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,9e50e90bc61a061 X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2002-10-28 06:58:09 PST From: "Dave Saunders" <daves@pdsassoc.com> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!proxad.net!proxad.net!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: Re: [VB] Nudging an inline frame Message-ID: <1de65841.3@WebX.la2eafNXanI> Date: Mon, 28 Oct 2002 04:46:51 -0800 References: <1de65841.-1@WebX.la2eafNXanI> Lines: 36 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit