Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

how can i get the Zeropoint of my documents to reset every time i open a document?

Advisor ,
Jun 09, 2016 Jun 09, 2016

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..

TOPICS
Scripting
526
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Advisor , Jun 09, 2016 Jun 09, 2016

app.addEventListener( "afterOpen" , doZeroPoint );

    function doZeroPoint()

        {

           app.documents[0].zeroPoint = [0,0];

          }

Ok this worked.

Translate
Advisor ,
Jun 09, 2016 Jun 09, 2016

app.addEventListener( "afterOpen" , doZeroPoint );

    function doZeroPoint()

        {

           app.documents[0].zeroPoint = [0,0];

          }

Ok this worked.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Jun 09, 2016 Jun 09, 2016

    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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 12, 2016 Jun 12, 2016

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

Indesign JavaScript Help

Regards,
Uwe

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Jun 12, 2016 Jun 12, 2016
LATEST

SOrry.  I meant to say document not page. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines