Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

252
Views
Is it possible to detect the change of page in InDesign using CEP/ExtendScript/JS?

I'm currently creating a plugin on InDesign and I would like to know if it's possible to detect if the user changes page ?

I searched in the web and documentation, I found a few events but nothing that interests me.

I thought about storing the user's current page, detecting if there is a click event in the application in general (because there are several ways to switch pages) and retrieving the current page to do something like :

If (previousCurrentPage == newCurrentPage) { 
    alert('The user changed page !');
}

But I don't think it's possible to handle all page switching techniques.

So I would absolutely need to detect a user's page change.

Thanks in advance !

UPDATE

What I mean by page change is page change in the document on InDesign.

Here, the user is therefore on the 1st page of the document :

enter image description here

Here the user is on the 3rd page of the document:

enter image description here

It's this change of page that I would like to be able to recover via my plugin.

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

You can look at

app.activeWindow.activePage

in Extendscript

about 4 years ago · Juan Pablo Isaza Report

0

SOLUTION

To get the index of the page, I make this line of code in ExtendScript :

app.activeWindow.activePage.documentOffset;

And to detect the page change, I have a setInterval() that is called every 700ms and calls the above code snippet.

If the previous page is different from the current page, I enter my condition and set my current page as the previous one.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!