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

Trying to change the active page

Explorer ,
Mar 03, 2017 Mar 03, 2017

Hello world!    

     I have an infuriatingly simple issue. Javascript. I am trying to figure out how to set the current active window to a specific hard coded page on a specific hard coded document so I can switch to a page, make selections and modifications on the page then switch to the next page, and reiterate through an entire document all through script without user interaction being necessary. I have tried a number of things but I just cant find any information on this online. Please help!!!

TOPICS
Scripting
3.0K
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

People's Champ , Mar 03, 2017 Mar 03, 2017

app.activeDocument.layoutWindows[0].activePage = app.activeDocument.pages[0];

Translate
People's Champ ,
Mar 03, 2017 Mar 03, 2017

app.activeDocument.layoutWindows[0].activePage = app.activeDocument.pages[0];

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
Explorer ,
Mar 03, 2017 Mar 03, 2017

Thank you so much for the quick and correct response!

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 Beginner ,
Jun 20, 2020 Jun 20, 2020

Thanks for this - do you know if there's anyway to wait for this to happen? I've changing contents of items on the activePage but sometimes the switch to a new active page is a little delayed and it starts overwriting on the same page for a while

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
Enthusiast ,
Aug 20, 2021 Aug 20, 2021
LATEST

you could try waitForTask();

task = app.....etc
task.waitForTask();
alert("Finished")

its for Background tasks... if that your purpose 

Best
Mohammad Hasanin
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