🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #9638

AS - Need to make dialog boxes and then do calulations

#9638
From: Kelly_Vaughn
Date: Tue, 15 Aug 2006 18:34
19 lines
2201 bytes
Here's what I need my script to do:
Create a new document with the same margins and bleed every time, but with a different document size every time. Then I need to place small circles at the four corners of the margins, and additional circles (varying in number every time, and for every side) distributed evenly across the top, bottom left, and right. (There are markers where we will be punching holes).

I think the best approach would be to do this using dialog boxes and basic calculations on the numbers entered in the first dialog box (take the width of the document minus the margin to get the x coordinate of one the rightmost circle). So far, I have accomplished creating a new document containers various layers. I've got with my margins and bleed set up, and I've got the first circle colored and positioned correctly. I'm a bit stumped as to how to duplicate the circles and then distribute them evenly.

Also, is there a way to assign a script label to a new object using a script? I'm thinking then I could select all objects that are assigned that script label and distribute them as needed.

But for starters, can anyone help me create a dialog box that tells InDesign how big to make my document size? Here's what I've got so far.

--Page Size Dialog Box
set myDialog to make dialog
tell myDialog
	set name to "Page Size"
	set myDialogColumn to make dialog column
	tell myDialogColumn column
	--Create a text entry field
	set myPageWidthField to make integer editbox with properties {edit contents: "12"}
	set myPageHeightField to make integer editbox with properties {edit contents: "12"}
end tell
Technical Details
Message-ID: <3bc1455a.-1@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news2.volia.net!news.ecp.fr!news.stben.net!webcrossing

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,93e9c2f7bc40a331,start
X-Google-Attributes: gidf939a,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: Kelly_Vaughn@adobeforums.com
Newsgroups: adobe.scripting.indesign
Subject: AS - Need to make dialog boxes and then do calulations
Message-ID: <3bc1455a.-1@webcrossing.la2eafNXanI>
Date: Tue, 15 Aug 2006 11:34:22 -0700
Lines: 36
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news2.volia.net!news.ecp.fr!news.stben.net!webcrossing