If you assume 'it' must be done with arrays you appear not to know much about any scripting language that can be used for InDesign. So I'm curious why you insist on AppleScript.
I don't understand your post.
You're right: it's not arrays but path points.
Anyway, my script is done.
It takes properties from a polygon in Indy, build the text of a VBA macro for creating the same polygon in Powerpoint (because there's no access to "PPT pathpoints" via AS).
As you see, I don't know nothing about any script language.
(And btw, I'm writing scripts since Xpress 3.1...)
Bonsoir from France (and sorry for my bad english).
var doc = app.activeDocument;
var currentPage = doc.layoutWindows.activePage;
If I'm right, the result of your script is a rectangle.
How do you set the values of pathpoints in JS?
do you mean something like this? (Sorry, but I'm not familar with AS, that's why JS)
app.layoutWindows.activePage.polygons.add().paths.entirePath = [[50,50],[150,50],[100,100]]; app.layoutWindows.activePage.polygons.add().paths.entirePath = [[50,130],[150,130],[100,160],[100,180]];
Thank you pixxxel for your help.
But, as I said in a previous post, my script is done.
In fact, I made 2 scripts for Indesign:
- one to create a polygone: I use a textbox to pass a list of values and the script makes the job for me.
- the second gets every point of a polygone. The AS code is (nearly) the same as your JS:
tell active document to set pathPointList to entire path of path 1 of selection
With that, the script builds a VBA macro which one I use to re-create the polygon in Powerpoint.
But now someone else (with the same problem) will find a solution for AS and for JS here in this thread.
Totally agree with you!