%SCR_OPENLIBRARY
WTSupported in traditional Synergy on Windows
|
|
USupported on UNIX
|
VSupported on OpenVMS
|
channel = %SCR_OPENLIBRARY(library[, create])
or
xcall SCR_OPENLIBRARY(library[, create])
Return value
channel
The channel of the opened library if successful; otherwise 0. (^VAL)
Arguments
library
The name of the window library file to open. (a)
create
(optional) A flag that indicates whether to create the library file. (n)
Do not create. (default)
Create if it doesn’t exist.
Create even if it exists.
Discussion
The %SCR_OPENLIBRARY function opens the specified window library file. If the library is already open, it is closed first and then reopened. If the open is successful, the channel is opened in the current environment. To promote it to global, use the U_GBLCHN subroutine.
If library does not specify an extension, it defaults to .ism.
If an error occurs, the error information is sent to the ESCRIPTERR_METHOD routine before this function returns.
A macro is provided in tools.def to simplify creating a library:
.define SCR_CREATELIBRARY(library) SCR_OPENLIBRARY(library,D_CREATE_ALWAYS)
See also
- E_METHOD for more information on registering environment methods
- ESCRIPTERR_METHOD more information on registering and writing a routine for handling script compilation errors