🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #15770

Re: Grops in JavaScript

#15770
From: Oleg Butrin
Date: Fri, 14 Nov 2003 06:53
36 lines
1470 bytes

      > //assuming that the selected items are on spread 1: > var myGroup =
      myDoc.spreads.item(0).groups.add(myDoc.selection);




This construction do not work, because myDoc.selection don't accepted as valid argument. Try:

var mySelection = new Array();
// Convert selection to array of objects before grouping
for (myCounter=0; myCounter<selection.length; myCounter++){
	mySelection[myCounter] = selection[myCounter]
}
var myGroup = myDoc.pages[0].groups.add(mySelection);

And one more question special for Olav :)

I can't move object by

//example from scripting guide
with(app){
mySelection = selection[0];
mySelection.move(["2p", "6p"]);
}

Result is:

JavaScrip error!
Error number: 19
Error string: "Bad argument move"
Line: 3
Source: mySelection.move(["2p", "6p"]);

How i can REAL move object?
Technical Details
Message-ID: <2cce5de8.1@webx.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!webx
References: <2cce5de8.-1@webx.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,542450f77787096d
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-11-13 23:07:51 PST
From: "Oleg Butrin" <butrin@hotbox.ru>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!webx
Newsgroups: adobe.scripting.indesign
Subject: Re: Grops in JavaScript
Message-ID: <2cce5de8.1@webx.la2eafNXanI>
Date: Thu, 13 Nov 2003 22:53:14 -0800
References: <2cce5de8.-1@webx.la2eafNXanI>
Lines: 32
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit