This script reads a format text field with the OO41 method, lets the operator edit it in a window with the OO5 text editor and writes the result back with OO41.

* NOTE: This example if for 8.4.1 and above.
* OO5 does not exist under earlier versions.
MAINLINE
DIM MSG$[2]
DO READ-TEXT
DO INPUT-TEXT
DO WRITE-TEXT
READ-TEXT
LET MSG$[0] = "READ LINK UTCUST, " + ! Which Link
"0001," + ! Key
"A" ! Text ID
CONNECT METHOD "OO41"
* returns each ros of text in string array entry
INPUT-TEXT
LET MSG$[0] = CHR(60) + ! Max line lenght
CHR(8) + ! number of lines
CHR(17) + ! column
CHR(11) + ! row
"BSS" ! Border, input string format,
! output string format
* msg$[1] ...[n] contains each row of text
CONNECT METHOD "OO5" ! Text Editor
WRITE-TEXT
LET MSG$[0] = "WRITE LINK UTCUST, "+ ! Link
"0001, " + ! Key
"A" ! Text ID
CONNECT METHOD "OO41"

Notes

  • This example is for 8.4.1 and later. OO5 does not exist in earlier versions.
  • OO41 returns each row of text in its own MSG$ entry, and OO5 edits those rows.
  • For OO5, MSG$[0] holds the maximum line length, number of lines, column, row and the border, input and output string formats.

Search tbred.com