Arbortext Command Language > Functions by Alphabetical Listing > oid_caret_pos
  
oid_caret_pos
oid_caret_pos ([oid])
This function returns the position of the cursor in characters from the specified oid, or oid_caret if oid is not supplied. oid_caret_pos will return -1 as a special case if the cursor is positioned before the end tag of the object, since this is more efficient than calculating the offset. Each non-text object (that is, markup, equations, tables, graphics) counts as one character. This position may be used with oid_caret and goto_oid o restore the cursor to a previous location in the document, for example:
oid = oid_caret()
pos = oid_caret_pos(oid)
...
goto_oid(oid, pos)
Related Topics
goto_oid function
oid_caret function