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

Trying to change the active page

Explorer ,
Mar 03, 2017 Mar 03, 2017

Copy link to clipboard

Copied

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

Views

2.5K

Translate

Translate

Report

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];

Votes

Translate

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

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

Thank you so much for the quick and correct response!

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

LATEST

you could try waitForTask();

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

its for Background tasks... if that your purpose 

Best
Mohammad Hasanin

Votes

Translate

Translate

Report

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