Hi,
I have looked every where for the solution to this but cannot find one, I am trying to get the number of pages that a pages document contains. I obviously could check manually but what I am doing is automatically filling out a specific set of words so I need to ensure that the document remains less than one page. I have found two links (1, 2) that I thought would help but haven’t ended up working.
Does anyone have any other ideas on how I could check this?
TLDR: I am trying to use AppleScript to check the amount of pages in a document.
Thanks for the feedback, I was trying to get it from an already open Pages document but you gave me another idea of how to find it, which was to have my mouse curser go to the last page of the document and then check that page number. I then went thought the Pages documentation and was able to find a currentPage class exists. Finally, I reframed my search and found a IWorkAutomation. I found a page related to Sections that happens to parse the document based on sections to find the entire length.
So the command I ended up using is set totalPages to the count of pages of every section
Thanks for making me think about it a different way!