home *** CD-ROM | disk | FTP | other *** search
- /*
- *
- * Script name: Status.rexx
- * Author: Franz Hemmer
- * Purpose: Demonstrate how to get status information from InterWord.
- * Related Program: InterWord Pro
- * Written: 01.03.93
- *
- */
-
- /*--------------------*/
- /* Get result in 'rc' */
- /*--------------------*/
- OPTIONS RESULTS
- PARSE ARG type
-
- /*-------------------------*/
- /* Address INTERWORD port. */
- /*-------------------------*/
- ADDRESS INTERWORD1
-
- /*---------------------------*/
- /* Check for type parameter. */
- /*---------------------------*/
- IF type = "" THEN
- DO
- STATUS
- PARSE VAR RESULT file drawer line linenum page x y lastlinenum select pagelen startpage saved
- SAY 'InterWord status:'
- SAY 'File = ' file
- SAY 'Drawer = ' drawer
- SAY 'Line = ' line
- SAY 'Line number = ' linenum
- SAY 'Page = ' page
- SAY 'Cursor at x, y = ' x ',' y
- SAY 'Last line num. = ' lastlinenum
- SAY 'Block selected?= ' select
- SAY 'Page length = ' pagelen
- SAY 'Start page = ' startpage
- SAY 'Document saved?= ' saved
- END
- ELSE
- DO
- STATUS type
- IF RC > 0 THEN
- DO
- SAY INTERWORD.LASTERROR
- END
- ELSE
- DO
- SAY 'Status type 'type' returned 'RESULT
- END
- END
-
-