Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


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

1.4K

Likes

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

Valorous Hero , Mar 03, 2017 Mar 03, 2017
app.activeDocument.layoutWindows[0].activePage = app.activeDocument.pages[0];

Likes

Translate

Translate
Valorous Hero ,
Mar 03, 2017 Mar 03, 2017

Copy link to clipboard

Copied

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

Likes

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!

Likes

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

Likes

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

Likes

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