Copy link to clipboard
Copied
Hi everybody !
First, I am a beginner in javascript, so I'm sorry if I ask stupid questions
I set myself a goal for my first script : changing the origin of artboard rulers. After reading a million posts about this, I managed to change globals rulers but I still haven't succeeded to change artboard rulers. I need help for this first mission because I have no idea how to change the rulers.
Thank you very much !
Have a nice day
Hi miyano_,
try this for the beginning:
var aDoc = app.activeDocument;
alert(aDoc.rulerOrigin); // in points
alert(aDoc.pageOrigin); // in points
And this thread could also be interesting for you:
JS - change CS5 Ruler Origin to bottom/left (like CS4)
Have fun
Copy link to clipboard
Copied
Hi miyano_,
try this for the beginning:
var aDoc = app.activeDocument;
alert(aDoc.rulerOrigin); // in points
alert(aDoc.pageOrigin); // in points
And this thread could also be interesting for you:
JS - change CS5 Ruler Origin to bottom/left (like CS4)
Have fun
Copy link to clipboard
Copied
Thanks for your answer ! I used "artboardRef.rulerOrigin = [(x), (y)]; ", It works well !
Have a nice day !
Miyano
Copy link to clipboard
Copied
For me I run this:
aDoc.rulerOrigin = [0, 0];
aDoc.pageOrigin = [0, 0];
alert(aDoc.rulerOrigin);
alert(aDoc.pageOrigin);
This alerts me of 0,0 as the coordinates for both rulerOrigin and pageOrigin.
However when I go to place something.
like placeFiles.top = 0
placeFiles.left = 0
the placed file appears at the bottom.
I'm not sure what I'm missing but it makes no logical sense to me.
Copy link to clipboard
Copied
var aDoc = app.activeDocument;