🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #119

Re: how to group some objects and duplicate it and then enlarge the same group using javascript ??

#119
From: sanatkumar
Date: Thu, 02 Apr 2009 13:27
28 lines
1434 bytes
Surely i m gonna offer.
jongware,I tried the following code.But i m getting error like this:

Error String:Cant create page item.No valid parent found.
How to fix it again!!

main();

function main(){
	if (app.documents.length != 0){
		if (app.selection.length > 0){
			//myDocument = app.documents.add();
			var myObjectList = new Array;
            var myObjectList1 = new Array;
for (i=0; i<app.selection.length; i++)

myObjectList.push (app.selection[i]);

alert ("length of myObjectList is "+myObjectList.length);

var myGroup = app.activeDocument.groups.add(app.selection,null,LocationOptions.AT_BEGINNING,app.activeWindow.activePage);

				}
			}
		}

thanks,
Sanat
Technical Details
Message-ID: <59b87303.15@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!newshub.sdsu.edu!webcrossing
References: <59b87303.-1@webcrossing.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,8506c72425d12370
X-Google-Attributes: gidf939a,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: sanatkumar@adobeforums.com
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!newshub.sdsu.edu!webcrossing
Newsgroups: adobe.scripting.indesign
Subject: Re: how to group some objects  and  duplicate
 it and then enlarge the same group using javascript
 ??
Message-ID: <59b87303.15@webcrossing.la2eafNXanI>
Date: Thu, 2 Apr 2009 06:27:50 -0700
References: <59b87303.-1@webcrossing.la2eafNXanI>
Lines: 29
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit