Copy link to clipboard
Copied
Hi there,
Is there a way to get the page names from the Pages Palette, under each page icon, using javascript?
I can access the page numbers however I need the page names.
Thanks.
Yes, the name property:
var p = app.activeWindow.activePage.name;
alert(p);
var p = app.activeWindow.activePage;
alert(p.appliedMaster.name + " " + p.name)
Copy link to clipboard
Copied
Hi @deckarduk , A page has name and documentOffset properties.āname should give you the name listed in the pages panel:
var p = app.activeWindow.activePage;
alert("\rActive page name: " + p.name + "\rActive page absolute number: "+(p.documentOffset + 1))
Result:
Copy link to clipboard
Copied
Hi Rob,
Thanks for the help.
Apologies, I should have explained better, I can get the 'absolute' page number.
Is there a way to get the information, e.g. 'Chap01-3', under each page icon as shown on the screen grab?
Thanks again.
Copy link to clipboard
Copied
Yes, the name property:
var p = app.activeWindow.activePage.name;
alert(p);
Copy link to clipboard
Copied
Thanks Rob š
I've just realised, I'm expecting the master page prefix too that's why I asked.
I'm presuming I can get that from somewhere and concatenate the two.
Thanks again.
Copy link to clipboard
Copied
var p = app.activeWindow.activePage;
alert(p.appliedMaster.name + " " + p.name)
Copy link to clipboard
Copied
Great, thanks for the help Rob š