2

How do I get the page number of each page and place it on the actual page using AppleScript?

I know how to place text in a placeholder text box, but I cannot figure out how to get the page number in AppleScript.

3

The pages are stored in ‘pages’. You can iterate over this with ‘repeat’.

tell application "Pages"
    activate
    tell document "Untitled.pages"
        repeat with i from 1 to number of pages
            set thispage to item i of pages
            (* do something
            -- variable i is the page number
            -- variable thispage is the page itself
            *)
        end repeat
    end tell
end tell

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .