🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #786

Re: extract items from a frame

#786
From: Peter Kahrel
Date: Tue, 03 Mar 2009 14:53
27 lines
1270 bytes
Turns out that CS4's duplicate() method is a bit different -- rather, it looks as if it has been fixed because in CS3 it seems to have issue. In CS3 you need this:

#target indesign;

app.activeDocument.viewPreferences.rulerOrigin = RulerOrigin.spreadOrigin; 
myPages = app.activeDocument.pages; 
for (i = 0; i < myPages.length; i++) 
  { 
  myFrames = myPages[i].allPageItems; 
  for (j = myFrames.length-1; j > -1; j--) 
    { 
    try 
      { 
      gb = myFrames[j].geometricBounds; 
      dupl = myFrames[j].duplicate (); 
      dupl.move ([gb[1],gb[0]]); 
      myFrames[j].remove(); 
      } 
    catch(_){} 
    } 
  }



Ah -- versions...

Peter
Technical Details
Message-ID: <59b81716.12@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!newshub.sdsu.edu!webcrossing
References: <59b81716.-1@webcrossing.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,50e6c9aacf044ae5
X-Google-Attributes: gidf939a,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Peter Kahrel" <kahrel@kahrel.plus.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!newshub.sdsu.edu!webcrossing
Newsgroups: adobe.scripting.indesign
Subject: Re: extract items from a frame
Message-ID: <59b81716.12@webcrossing.la2eafNXanI>
Date: Tue, 3 Mar 2009 06:53:02 -0800
References: <59b81716.-1@webcrossing.la2eafNXanI>
Lines: 27
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit