"Welcome back my friends to the show that never ends" - I'm trying to handle variables and need to know whether the current page is a master page or body page. As You know, on a master page more system variables are valid (Running H/F xx, Current Page #). So to set up a list of valid system vars I need to know where I am.
I read in the doc: PageObject is any Page object i.e., BodyPage, MasterPage, ReferencePage, HiddenPage.
Experiments show that I get answers with this short pgm - but what kind of pages are 'hidden' in the values 0...4, > 7 ?
Is this the correct way to test for the page type?
// CheckPageType.jsx var oDoc = app.ActiveDoc; var oPage = oDoc.CurrentPage; var pageType = oPage.type; $.writeln ("page = " + pageType); /* type reported 5 Constants.FO_BodyPage 6 Constants.FO_MasterPage 7 Constants.FO_RefPage */
Ah well, "don't check for an error situation you don't know how to handle".