Copy link to clipboard
Copied
I've Tried the below but it is not working. I want it to reset the Ruler Origin PAGE_ORIGIN when a document is opened. How can i accomplish this?
app.documents[0].zeroPoint = [0,0];
and i'm wanting it to be (RulerOrigin.PAGE_ORIGIN) on every page.
I am entering this into my startup script that was created on here. is HERE>> ALMOST there and done but a little more help please. in InDesign Scripting <<
Thanks you for your help..
app.addEventListener( "afterOpen" , doZeroPoint );
function doZeroPoint()
{
app.documents[0].zeroPoint = [0,0];
}
Ok this worked.
Copy link to clipboard
Copied
app.addEventListener( "afterOpen" , doZeroPoint );
function doZeroPoint()
{
app.documents[0].zeroPoint = [0,0];
}
Ok this worked.
Copy link to clipboard
Copied
app.addEventListener( "beforeSave" , doTextFrameOnPageOne );
app.addEventListener( "beforeSave" , doZeroPoint);
app.addEventListener( "afterOpen" , doZeroPoint );
function doZeroPoint()
{
app.documents[0].zeroPoint = [0,0];
}
Will having 2 beforeSave eventListeners Mess anything up? So far its fine but is there a better way to do this?
Copy link to clipboard
Copied
cbishop01 wrote:
… and i'm wanting it to be (RulerOrigin.PAGE_ORIGIN) on every page.
On every page?
Do you expect, that the ruler origin could be different on every page of a document?
Consult the DOM documentation of your confidence and look up ViewPreference .
And check its usage in the Object of or in the Element of section.
InDesign ExtendScript API (11.0)
Adobe InDesign CS6 (8.0) Object Model JS: Table of Contents
Regards,
Uwe
Copy link to clipboard
Copied
SOrry. I meant to say document not page.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now