T_TXTWRT

Store text into a window library

WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
xcall T_TXTWRT(channel, entry_name, control[, text, array_size])

channel

The channel on which the window library is opened. (n)

entry_name

The identifier (name) of the text entry in the library (a maximum of 15 characters). Must be unique among window names stored in the library. (a)

control

One of the following processing controls on entry: D_CREATE to create new entry (no replacement), D_REPLACE to create entry and replace any existing, or D_APPEND to append to existing entry. (n)

text

(optional) The first element of the text array to be written. (a)

array_size

(optional) The number of entries in the text array. (n)

T_TXTWRT creates and/or writes to text entries in a window library. These entries are stored in compressed form: trailing blanks are stripped and multiple blanks are compressed.

On exit, control is set to D_APPEND if the operation is successful or D_EXISTS if you request that an entry that already exists be created (with D_CREATE). Control is set to D_NOFIND (defined in the tools.def file) if you request an append operation to an entry that does not exist. D_EXISTS and D_NOFIND are negative numbers, and you can test for an error condition by checking whether control is less than 0.

If D_CREATE or D_REPLACE is successful and no text was passed, the entry within the library has been created and is empty. (In other words, if you create or replace an entry without specifying any text, you create an empty entry.)

If you write text to a library using T_TXTWRT, that text can only be read with T_TXTRD. You can add text to an entry at any time.

The following example takes 10 elements from helptxt, compresses them, and creates a text entry called “menuhlp” in the window library opened on g_utlib.

ctrl=D_CREATE
xcall t_txtwrt(g_utlib, "menuhlp", ctrl, helptxt, 10)