🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #9819

[Mac Indesign CS2 JS] add rectangle as big as the page

#9819
From: nilom
Date: Tue, 18 Jul 2006 16:45
12 lines
1255 bytes
Hi all,
I am new with JS and I landed here after wandering all over the net.
I just need a jsx that adds a ractangle to a 1 page indesign cs2 file.
The only thing I found was:
var myRectangle = app.activeDocument.pages.item(0).rectangles.add({strokeWeight:.567}).
It works great but doesn't fit the page.
I would like an example on how to make the rectangle fit the page keeping the stroke within the page, how to change the stroke color, and keep the color fill empty.
If you can be so kind.
I would also need to put four guides 2mm from the border of the page in all four directions (top, left, bottom, right).
Hope I'm not asking much.

Nilom
Technical Details
Message-ID: <3bc0f435.-1@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.germany.com!newsfeed.freenet.de!news.albasani.net!news.ecp.fr!news.stben.net!webcrossing

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,9f82f6293d15dcff,start
X-Google-Attributes: gidf939a,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: nilom@adobeforums.com
Newsgroups: adobe.scripting.indesign
Subject: [Mac Indesign CS2 JS] add rectangle as big as the page
Message-ID: <3bc0f435.-1@webcrossing.la2eafNXanI>
Date: Tue, 18 Jul 2006 09:45:59 -0700
Lines: 16
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.germany.com!newsfeed.freenet.de!news.albasani.net!news.ecp.fr!news.stben.net!webcrossing