Apparently, AppleScript has introduced "parent page" for Indesign CS5.
This code line is ok for Indesign CS5:
set myPage to name of parent page of parent text frames of ... (some text after a search)
This gives me the page number where the search text.
But i use InDesign CS4.
Does anyone have an idea of its equivalent in InDesign CS4 or the way to extract this page number?
-- one way
tell application "Adobe InDesign CS4"
set theDoc to active document
name of parent of text frame "frame1" of page 5 -- 5 is absolute page num; "frame1" is script label of text frame
--> "28" -- based on Numbering & Section options