Example 1 and 4 of the v17R56 Write Pro manual for the command WP Get position contain an error. ‘WP Get selection’ has been renamed to ‘WP Text range’.
$range:=WP Get selection(WParea) //range from user selection
$rangePosition:=WP Get position($range;wk 4D Write Pro layout)
ALERT("First page number in selection is "+String($rangePosition.page))