🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #8973

Re: Moving graphics

#8973
From: Peter_Kahrel
Date: Mon, 18 Sep 2006 08:18
59 lines
1790 bytes

      The problem is, that I moved just the image without the frame




Images live in rectangles. To move your image with the rectangle, use this: 

      myImage.parent.move([10,10])





      What kind of object have I created by myImage=app.activeWindow.activePage.place(myFile,[100,50])




An object of type Image. 

      Is there a function that would tell you the name of the object you are
      using?




Straight after placing the image, do alert( myImage.constructor.name ) 

      What magic line is it missing in order to move objects with frames




See above. 

      fit is not a function




This too is solved by addresseing the image's parent: myImage.parent.fit( etc. 

      move 'to' or 'by'




To move 'by' instead of 'to', leave the first position undefined: 

      myImage.move( undefined, [10,0] )




See <http://www.oreilly.com/catalog/scriptingindesign/> for an introduction to scripting InDesign with JavaScript (though it has precious little to say about graphics).

Peter
Technical Details
Message-ID: <3bc1aa75.0@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news4.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeed.freenet.de!news.albasani.net!news.motzarella.org!news.isoc.lu!webcrossing
References: <3bc1aa75.-1@webcrossing.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,f6cff25e097ea658
X-Google-Attributes: gidf939a,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: Peter_Kahrel@adobeforums.com
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news4.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeed.freenet.de!news.albasani.net!news.motzarella.org!news.isoc.lu!webcrossing
Newsgroups: adobe.scripting.indesign
Subject: Re: Moving graphics
Message-ID: <3bc1aa75.0@webcrossing.la2eafNXanI>
Date: Mon, 18 Sep 2006 01:18:57 -0700
References: <3bc1aa75.-1@webcrossing.la2eafNXanI>
Lines: 31
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit