Place items on folioed pages

Hello all script gurus!

I have an indesign / applescript question that I need some help with. Help much appreciated.

I have a library named “TemplateLibrary” in which I have many named items.

In my example below I can place “Item12” onto the absolute page 5 of myDocument.
If the document has a section start; say the first page is numbered as page 4. Then the (absolute) 5th page in the document is numbered as page 8.

Can I change my script to place the item onto the folioed page, instead of the absolute page number?
I don’t want to have to choose the page manually, i’d like it write it into the script.

Here’'s the script

tell application “Adobe InDesign CC 2014”
activate
set myDocument to active document
set myPage to page 5 of myDocument
set active page of layout window 1 to myPage
set assetPlacer to place asset asset “Item12” of library “TemplateLibrary.indl” on myDocument
end tell

Cheers

Bill

Model: Imac 27"
AppleScript: 2.4
Browser: Safari 537.36
Operating System: Mac OS X (10.10)

You need to use the page name as a string – so:

    set myPage to page "8" of myDocument