Hello,
I have a script which creates crop marks at the corners of the new doc:
var myDoc = app.activeDocument;
var selectedObject = myDoc.selection[0];
var objectW = selectedObject.width;
var objectH = selectedObject.height;
myDoc.cropBox = [ 0, 0, objectW, objectH,];
The script runs with no syntax hiccups, but the result is odd. The crop marks look inverted, and when I export an image where any artwork falls outside the paste-board ( not sure if this is the correct term but basically the 'paper area') , that art is included in the export, which is not the normal behavior of a 'Object:Crop Marks:Make" command. I have tried a myriad of digits in those 4 slots of the .cropBox command and not gotten the results I want. What have I missed?
-R
( As a side note: I am a little confused at how Illustrator calculates the placement of objects. x: 0 and y : 0 seems to be the lower left corner of the current paste-board. By choosing an object and moving it to 0, 0 it actually falls off the paste-board. This is unlike what I am used to with Flash which uses the upper left corner for 0,0 solidly placing the art where it would be seen. If anyone knows of a document that explains how to think about the coordinate space in Illustrator, that could help me.)