tell application "QuarkXPress"
tell document 1
set pgNum to page number of current page
if pgNum / 2 mod 1 is 0 then
--do something
else
--do something else
end if
end tell
end tell
If you intend to loop through a document, first get a count of pages, then use that number as your limit condition in the loop, like this:
tell application "QuarkXPress"
set pgCount to (count of pages in document 1)
tell document 1
set pgNum to page number of current page
repeat with pgNum from 1 to pgCount
if pgNum / 2 mod 1 is 0 then
--do something
else
--do something else
end if
end repeat
end tell
end tell
It’s been a while since I wrote any Quark scripts, but I seem to recall that getting the number of a page can be a problem if someone has used a section start so that, for example, the first page in a document is really page 2. In that case, the number of the page is 1 (its position in the document) but the name of the page is “2”.
So I’d get the name and coerce it to a integer. Which brings up another wrinkle if someone has used section start to assign a prefix, which now has to be filtered out.