NetBasic API Reference


OBJECT:Check

Module:NB.NLM
Purpose:Determine if an attribute exists within an object.
Syntax:<lExist> = OBJECT:Check(<oObject>,<sAttibute>)
Description:OBJECT:Check determines if the object <oObject> has the attribute <sAttribute>. The returned logical <lExist> is true when the object <oObject> has the attribute <sAttribute>, and is false otherwise.
Outputs:Logical
See Also:OBJECT:Make
Example:MyObj = OBJECT:Make("Name","Bob")
MyObj = MyObj + OBJECT:Make("Age",34)
Print(OBJECT:Check(MyObj,"Age"))

Go to Table of Contents

OBJECT:Make

Module:NB.NLM
Purpose:Create a user defined object with a specified attribute.
Syntax:<oObject> = OBJECT:Make(<sAttribute>,Value>)
Description:OBJECT:Make creates the user defined object <oObject> with the attribute <sAttribute> and attribute value Value>. User defined objects may be used to return multiple values from functions or subroutines.
Outputs:User defined object
Note:When objects are added together, the resulting object contains all the attributes for the added objects.
See Also:OBJECT:Check, Appendicies
Example:MyObj = OBJECT:Make("Name","Bob")
MyObj = MyObj + OBJECT:Make("CPU","486DX")
MyObj = MyObj + OBJECT:Make("Monitor","VGA")
Print(MyObj.Name," ",MyObj.CPU," ",MyObj.Monitor)

Go to Table of Contents

PARAM

Module:NB.NLM
Purpose:Get the parameters that are passed to a function or subroutine.
Syntax:Parameter> = Param (<iNumber>, <xDefault>)
Description:Param returns the parameter Parameter>, specified by the number <iNumber>, that is passed to a function or subroutine. Parameters are numbered sequentially, based on the order they are passed to the function or subroutine. The Param command is used within a function or subroutine to retrieve the parameters that are passed from the calling program. The optional parameter <xDefault> specifies a default parameter value that can be used when the parameter is not passed from the calling program.
Outputs:Any data type
See Also:PARAM:Count, SYS:Param, SYS:Param:Count
Example:ShowInfo("BOB","SMITH",27)
ShowInfo("LINDA")
Quit

Sub ShowInfo
If (Param:Count < 1)
Print("Insufficient parameters supplied"); Return
EndIf
Print("First Name ", Param(1))
Print("Last Name ", Param(2, "Not Specified"))
Print("Age ", Param(3, "Not Specified"))
End sub

Go to Table of Contents

PARAM:Count

Module:NB.NLM
Purpose:Determine the number of parameters passed to a function or subroutine.
Syntax:<iCount> = PARAM:Count
Description:Param:Count returns the integer <iCount> that represents the number of parameters that are passed to a function or subroutine.
Outputs:Integer
See Also:",MyObj.CPU," ",MyObj.Monitor)
See Also:PARAM, SYS:Param:Count, SYS:Param
Example:ShowInfo("BOB","SMITH",27)
ShowInfo("LINDA")
Quit

Sub ShowInfo
If (Param:Count < 1)
Print("Insufficient parameter supplied")
End sub
EndIf
Print("First Name ", Param(1))
Print("Last Name ", Param(2, "Not Specified"))
Print("Age ", Param(3, "Not Specified"))
End sub

Go to Table of Contents

PORT:Byte:In

Module:NB.NLM
Purpose:Read one byte from a specified port address.
Syntax:<iData> = PORT:Byte:In (<iPortAddress>)
Description:PORT:Byte:In reads one byte (8 bits) from the port specified by the port address <iPortAddress>. The data is returned as an integer.
Outputs:Integer
See Also:PORT:Byte:Out
Example:Data = PORT:Byte:In(DATA:Hex:Integer("60"))
Print("The scan code is ", Data)

Go to Table of Contents

PORT:Byte:Out

Module:NB.NLM
Purpose:Write one byte to a specified port address.
Syntax:PORT:Byte:Out (<iPortAddress>, <iData>)
Description:PORT:Byte:Out writes one byte (8 bits) to the port specified by the port address <iPortAddress>. The data is supplied as an integer.
See Also:PORT:Byte:In
Example:PORT:Byte:Out(DATA:Hex:Integer("03F8"), 65)
Print("Data is written to the serial port ")

Go to Table of Contents

PORT:Word:In

Module:NB.NLM
Purpose:Read one word from a specified port address.
Syntax:<iData> = PORT:Word:In (<iPortAddress>)
Description:PORT:Word:In reads one word (2 bytes) from the port specified by the port address <iPortAddress>. The data is returned as an integer.
Outputs:Integer
See Also:PORT:Word:Out
Example:Data = PORT:Word:In(DATA:Hex:Integer("34"))
Print("Data read is ", Data)

Go to Table of Contents

PORT:Word:Out

Module:NB.NLM
Purpose:Write one word to a specified port address.
Syntax:PORT:Word:Out (<iPortAddress>, <iData>)
Description:PORT:Word:Out writes one word (2 bytes) to the port specified by the port address <iPortAddress>. The data is supplied as an integer.
See Also:PORT:Word:In
Example:PORT:Byte:Out(DATA:Hex:Integer("34"), 1024)
Print("Data is written to port 34")

Go to Table of Contents

Print

Module:NB.NLM
Purpose:Write information to the standard output device.
Syntax:Print (Information1>[,<xInformation2>[,...]])
Description:Print writes information to the standard output device. By default, the standard output device is the display screen where the Print command displays the information at the current cursor location on the desktop window. Multiple parameters are separated by commas. The Print command updates the current cursor position.
Note:The parameters supplied to the Print command can be of any data type. The Print command writes over any visible windows and should not be used in conjunction with WIN:... commands. The FIO:Output:Select command is used to select the output destination for the Print and Newline commands. Strings that start with a single quote must be terminated with a single quote and strings that start with a double quote must be terminated with a double quote.
See Also:FIO:Output:Select, WIN:Say, Error! Reference source not found., Appendicies
Example:Print("Attention all network users."); Newline
Print('Hello There')
Print("Please delete all your unwanted files.")

Go to Table of Contents

Sub

Module:NB.NLM
Purpose:Start a user definable subroutine.
Syntax:Sub <sName>
Description:Sub identifies the start of a user definable subroutine and is used by programmers to create reusable codes. All subroutines are terminated by the End Sub command that always returns a value to the calling program. (When the Return command is used without any parameter, it returns a null.) Both the Sub and Function commands are used interchangeably and are executed in the same manner. The string <sName> identifies the user defined subroutine.
Note:The main subroutine executed upon the start of the application should be named "Main".
See Also:; rem get the cgi variable auto
Name=DOC:Var("AUTO","MAZDA"); rem get the cgi var, if no variable is passed use mazda for default
See Also:End Sub, Return, Function
Example:See: example for the LOCAL command

Go to Table of Contents

Quit

Module:NB.NLM
Purpose:Terminate the currently running program.
Syntax:Quit
Description:Reset all system settings and terminate the currently running program.
Note:When the Return command is issued within the subroutine Main, the result is the same as the Quit command.
See Also:Return, Appendicies
Example:WIN:Clear
Line = Str:Repeat("*",80)
Row = 1
Do While (Row <= 25)
WIN:At(Row,1); WIN:Say(Line)
Row = Row + 1
EndDo
Sys:Delay(3000)
WIN:Clear
Quit

Go to Table of Contents

Rem

Module:NB.NLM
Purpose:Designate a line of code as a comment for the program.
Description:Rem designates one line of the source code as a comment for the program and prevents the line from executing. Executable commands should not appear on the same line after the Rem command.
Note:A single quote may also be used as Rem.
Example:Rem **************************************
Rem * Program name : EXAMPLE.NML *
Rem **************************************

' A single quote is used to designate this
' line of code as comment.

Go to Table of Contents

Return

Module:NB.NLM
Purpose:Return the flow of the program back to the calling function or subroutine.
Syntax:Return ([ReturnedValue>])
Description:Return transfers the flow of the program back to the calling function or subroutine. The parameter ReturnedValue> is used to return a value to the calling program. When the optional parameter <xReturnedValue> is not specified, the null string is returned. Both subroutines and functions can return a value to the calling program.
Note:When the Return command is issued within the subroutine Main, the result is the same as the Quit command.
See Also:Quit, Function, Procedure
Example:ShowInfo("BOB","SMITH",27)
ShowInfo("LINDA")
Quit

Sub ShowInfo
If (Param:Count < 1)
Print("Insufficient parameter supplied")
Return
EndIf
Print("First Name ", Param(1))
Print("Last Name ", Param(2, "Not Specified"))
Print("Age ", Param(3, "Not Specified"))
End sub

Go to Table of Contents

RPC:Call

Module:NB.NLM
Purpose:Run a remote or external subroutine/function.
Syntax:Return> = RPC:Call(<oObject>,<sName>,<xParam1>[,xParam2 [,...]])
Description:RPC:Call runs a subroutine or function in an external file specified by the file name <sName>. The entire application must be placed in one source file. The remote function is run outside the source file of the application currently running. The external file must have only one function, and the command Function is not necessary to define it. The external file name <sName> must contain a path, or the RPC file must be located within a search path (See: Environment Objects). The string Param1> supplies parameters to the external function. Multiple parameters are separated by commas. The parameter <oObject> is reserved for future releases, and a null character should be supplied for this version. The external function returns a value <xReturn> to the calling application.
Outputs:String, Integer, Real, Logical, Object
See Also:Appendicies
Example:' Call Remote Subroutine NLMVER.RPC
NLMObj = RPC:Call("","NLMVER.BAS","SYS:SYSTEM\EDIT.NLM")

Go to Table of Contents

SOUND:Tone:Off

Module:SOUND.NLM
Purpose:Stops a speaker tone.
Syntax:SOUND:Tone:Off
Description:Stops the speaker tone generated using Sound:Tone:On.
See Also:SOUND:Tone:Play, SOUND:Tone:On
Example:SOUND:Tone:On(130)
SYS:Delay(1000)
SOUND:Tone:Off

Go to Table of Contents

SOUND:Tone:On

Module:SOUND.NLM
Purpose:Sounds a speaker tone.
Syntax:SOUND:Tone:On(<Frequency>)
Description:Sounds the speaker at the frequency <Frequency>.
See Also:SOUND:Tone:Play, SOUND:Tone:Off
Example:SOUND:Tone:On(130)
SYS:Delay(1000)
SOUND:Tone:Off

Go to Table of Contents

SOUND:Tone:Play

Module:SOUND.NLM
Purpose:Sounds a speaker tone for a period of time.
Syntax:SOUND:Tone:Play(<Frequency>,<Duration>)
Description:Sounds the speaker at the frequency <Frequency> for the duration <Duration>. The duration is measured in increments of 1/1000 of a second. The frequency is measured in hertz. The table below shows the frequencies of standard musical notes.
PitchFrequencyPitchFrequency
C131mid C262
C#139C#277
D147D294
D#156D#311
E165E330
F175F349
F#185F#370
G196G392
G#208G#415
A220A440
A#233A#466
B247B494
C523
See Also:SOUND:Tone:On, SOUND:Tone:Off
Example:SOUND:Tone:Play(130,1000)

Go to Table of Contents

STR:Length

Module:NB.NLM
Purpose:Determine number of characters in a string.
Syntax:<iLength> = STR:Length (<sString>)
Description:Return the integer <iLength> equal to the number of characters in the string <sString>.
Outputs:Integer.
Note:STR:Length retrieves a value versus computing a value. Therefore, a NetBasic character string may contain embedded NULL characters.
See Also:Appendicies
Example:TestString = "This string has 30 characters."
Print("The string has ",STR:Length(TestString))
Print(" characters.")

Go to Table of Contents

STR:Lower

Module:NB.NLM
Purpose:Convert all characters of a string to lowercase.
Syntax:<sLower> = STR:Lower (<sString>)
Description:STR:Lower returns the string <sLower> that represents all characters in the string <sString> converted to lowercase.
Outputs:String
See Also:**
Example:MyString = "THIS WILL BE CONVERTED TO LOWERCASE"
Print("The lowercase version is: ")
Print(STR:Lower(MyString))

Go to Table of Contents

STR:Pad:Left

Module:NB.NLM
Purpose:Add blank characters to the left of a string.
Syntax:<sPadded> = STR:Pad:Left (<sString>, <iSize>)
Description:STR:Pad:Left adds blank characters to the left of the string <sString> to meet the string length size specified by the integer <iSize>, and returns the new string <sPadded>. When the length of the supplied string <sString> is already greater than or equal to the specified size <iSize>, the string <sString> is returned.
Outputs:String
Note:Use the STR:Pad:Left command to create fixed length strings.
See Also:STR:Pad:Right
Example:TestString = "This is a test string"
Print(STR:Pad:Left(TestString,50))

Go to Table of Contents

STR:Pad:Right

Module:NB.NLM
Purpose:Add blank characters to the right of a string.
Syntax:<sPadded> = STR:Pad:Right (<sString>, <iSize>)
Description:STR:Pad:Right adds blank characters to the right of the string <sString> to meet the sring length size specified by the integer <iSize>, and returns the new string <sPadded>. When the length of the supplied string <sString> is already greater than or equal to the specified size <iSize>, the original string <sString> is returned.
Outputs:String
Note:Use the STR:Pad:Right command to create fixed length strings.
See Also:STR:Pad:Left, Appendicies
Example:TestString = "This is a test string"
Print(STR:Pad:Right(TestString,50))

Go to Table of Contents

STR:Repeat

Module:NB.NLM
Purpose:Repeat a string for a specified number of times.
Syntax:<sRepeated> = STR:Repeat (<sString>, <iTimes>)
Description:STR:Repeat repeats a string for a specified number of times. The string <sRepeated> returned by STR:Repeat represents the string <sString> repeated as many times as specified by the integer <iTimes>.
Outputs:String
See Also:Appendicies
Example:Name = STR:Repeat(" ", 48)
WIN:At(4,1); WIN:Say("Enter the new user name ")
WIN:Get:Color(78); WIN:Get(Name)
WIN:Get:Read

Go to Table of Contents

STR:Search

Module:NB.NLM
Purpose:Determine the position of one string within another string.
Syntax:<iPosition> = STR:Search (<sString1>, <sString2>)
Description:STR:Search finds the position for the first occurrence of the string <sString1> within the string <sString2>. The returned integer <iPosition> is zero if the string <sString1> is not found within <sString2>.
Outputs:Integer
See Also:STR:Sub
Example:Message = "Attention all network users"
SearchWord = "network"
Position = STR:Search(SearchWord, Message)

Go to Table of Contents

STR:Sub

Module:NB.NLM
Purpose:Extract a specified portion of a string.
Syntax:<sSubStr> = STR:Sub (<sString>,<iStart>,[<iCount>])
Description:Extract a portion of the string <sString> that starts at character position <iStart> and has length <iCount>, and returns it as the string <sSubStr>. Both starting position <iStart> and the number of characters extracted <iCount> must be positive numbers. When the optional parameter <iCount> is not supplied or there are not enough characters in the string <sString> to fulfill the request, the extracted string <sSubStr> begins with the start position <iStart> and ends with the last character in the string <sString>.
Outputs:String
See Also:STR:Trim:All, STR:Trim:Left, STR:Trim:Right, Appendicies
Example:FullName = "BOB SMITH"
Print("First Name is ", STR:Sub(FullName, 1, 3))

Go to Table of Contents

STR:Trim:All

Module:NB.NLM
Purpose:Remove all leading and trailing blanks and tabs from a string
Syntax:<sTrimmed> = STR:Trim:All (<sString>)
Description:Remove all leading and trailing blanks and tabs from a specified string. The string <sTrimmed> returned by STR:Trim:All represents the string <sString> without any leading or trailing blanks or tabs.
Outputs:String
See Also:Appendicies
Example:MyString = " Extra blanks have been deleted "
Print("Trimmed string is: ")
Print(STR:Trim:All(MyString))

Go to Table of Contents

STR:Trim:Left

Module:NB.NLM
Purpose:Remove all leading blanks and tabs from a specified string.
Syntax:<sTrimmed> = STR:Trim:Left (<sString>)
Description:STR:Trim:Left removes all leading blanks and tabs from a specified string. The string <sTrimmed> returned by the STR:Trim:Left command represents the string <sString> without any leading blanks or tabs.
Outputs:String
See Also:**
Example:MyString = " Leading blanks have been deleted "
Print("Trimmed string is: ")
Print(STR:Trim:Left(MyString))

Go to Table of Contents

STR:Trim:Right

Module:NB.NLM
Purpose:Remove all trailing blanks and tabs from a specified string.
Syntax:<sTrimmed> = STR:Trim:Right (<sString>)
Description:STR:Trim:Right removes all trailing blanks and tabs from a specified string. The string <sTrimmed> returned by the STR:Trim:Right command represents the string <sString> without any trailing blanks or tabs.
Outputs:String
See Also:**
Example:MyString = " Trailing blanks have been deleted "
Print("Trimmed string is: ")
Print(STR:Trim:Right(MyString))

Go to Table of Contents

STR:Upper

Module:NB.NLM
Purpose:Convert all characters of a string to uppercase.
Syntax:<sUpper> = STR:Upper (<sString>)
Description:STR:Upper returns the string <sUpper> that represents all characters in the string <sString> converted to uppercase.
Outputs:String
See Also:**
Example:MyString = "this will be converted to uppercase."
Print("The uppercase version is: ")
Print(STR:Upper(MyString))

Go to Table of Contents

SYS:Call

Module:NB.NLM
Purpose:Run an external program by making a system call to the Operating System.
Syntax:<lSuccess> = SYS:Call (<sProgramName>, [<sParameters>])
Description:SYS:Call executes the external program specified by the program name <sProgramName> by making a system call to the Operating System. The optional string <sParameters> supplies parameters to the external program. The returned logical <lSuccess> is true when the external program is properly executed, and is false otherwise. When the returned logical is false, the Err command returns a number which may be used to identify the cause of failure.
Outputs:Logical
See Also:**
Example:SYS:Call("MONITOR.NLM"); Rem -- Load monitor.nlm

Go to Table of Contents

SYS:Date:Get

Module:NB.NLM
Purpose:Retrieve a system date object
Syntax:<oSysDate> = SYS:Date:Get
Description:SYS:Date:Get returns the system date object <oSysDate>, containing the system date and time for the computer running the calling program.
Outputs:System date object
Attributes:[Read-Only]: Date, Time, Error
See Also:NET:Server:Date:Get, Appendicies
Example:SysDateObj = SYS:Date:Get
If (SysDateObj.Error = 0)
Print("System date is", SysDateObj.Date)
Print("System time is", SysDateObj.Time)
EndIf

Go to Table of Contents

SYS:Delay

Module:NB.NLM
Purpose:Delay program execution for a specified time.
Syntax:SYS:Delay (<iDelayTime>)
Description:SYS:Delay delays execution of the program. The parameter <iDelayTime> specifies the delay time in milliseconds (1/1000 of a second). When developing an NLM program, the SYS:Delay command may be used within all CPU intensive Do While statements to return control of the CPU to the NetWare Operating System.
See Also:Appendicies
Example:Print("Delay for 1 second"); SYS:Delay(1000)
Newline
Print("Delay for 3 seconds"); SYS:Delay(3000)
Newline
Print("Delay for 10 seconds"); SYS:Delay(10000)
Newline
Print("Delay for 31/2 seconds"); SYS:Delay(3500)

Go to Table of Contents

SYS:Error:Change

Module:NB.NLM
Purpose:Set the error number returned by the Err command.
Syntax:SYS:Error:Change (<iErrorNumber>)
Description:SYS:Error:Change sets the error number returned by the Err command.
See Also:SYS:Error:Number
Example:SYS:Error:Change(-101)

Go to Table of Contents

SYS:Error:Number

Module:NB.NLM
Purpose:Determine the error number set by the last command.
Syntax:<iErrorNumber> = SYS:Error:Number
Description:SYS:Error:Number returns the error number <iErrorNumber> set by the last command. Certain commands return a logical to indicate whether the specified task has been properly performed. When such commands fail to perform the designated task, a logical false is returned, and the error number is set to indicate the cause of the failure. The SYS:Error:Number command checks the error number set by the last command. See Appendix D - Reserved Error Names for a list of errors associated with all classes of commands.
Outputs:Integer
Note:Not every command that returns a logical sets the error number. Some commands other than logical change the SYS:Error:Number.
See Also:SYS:Error:Change, Appendicies
Example:SYS:Error:Number

Go to Table of Contents

SYS:Info

Module:NB.NLM
Purpose:Get the system information object.
Syntax:<oSysInfo> = SYS:Info
Description:SYS:Info returns the system information object <oSysInfo> that contains the system information for the computer that is running the program. Included in the object is Request.Type. The attribute has the value determined by how the script is being run. If it is being executed in the shell or is using the run command, the value will be NORMAL. However, if it was executed using the WEB, the value will be WEBLOCAL. If it is not possible to determine how the script was run, UNKNOWN will be returned. This attribute was added so that a script can only be run the way it was designed. In other words, if a script was designed for the WEB, a check can be made to see if it is running on the WEB. If it is not, the script can terminate.
Outputs:System information object
Attributes:[Read-Only]: Monitor.Type, OS.Type, OS.Version, Request.Type, Shell.Version, Error
See Also:SYS:Date:Get, System
Example:SysInfoObj = SYS:Info
If (SysInfoObj.Error = 0)
Print("Running on ", SysInfoObj.OS.Type)
Print(" Version ", SysInfoObj.OS.Version)
EndIf

Go to Table of Contents

SYS:Param

Module:NB.NLM
Purpose:Get the parameters that are passed to the program from the Operating System.
Syntax:Parameter> = SYS:Param (<iNumber>)
Description:SYS:Param is used within the Main subroutine to return the parameter Parameter>, specified by the number <iNumber>, that is passed to the program from the Operating System. Parameters are numbered sequentially, based on the order they are passed to the program.
Outputs:Any data type
See Also:SYS:Param:Count, Appendicies
Example:Szbuf = DATA:Integer(SYS:Param(2))

Go to Table of Contents

SYS:Param:Count

Module:NB.NLM
Purpose:Determine the number of parameters passed to the program from the Operating System.
Syntax:<iCount> = SYS:Param:Count
Description:SYS:Param:Count returns the integer <iCount> that represents the number of parameters that are passed to the program from the Operating System.
Outputs:Integer
See Also:SYS:Param, Appendicies
Example:If (SYS:Param:Count < 2); Quit; EndIf

Go to Table of Contents

True

Module:NB.NLM
Purpose:Representation for logical true.
Syntax:<lTrue> = True
Description:True returns the logical <lTrue> which represents the logical true (opposite to False). A condition can have a true or false state. True means the condition is met.
Outputs:Logical
See Also:riable DAT: is created")
EndIf
See Also:False, Appendicies
Example:Continue = True
WIN:At(20,2); WIN:Say("Do you want to continue ")
WIN:Get(Continue); WIN:Get:Picture("Y")
ExitKey = WIN:Get:Read
If ((!Continue) | (ExitKey = KEY_ESC))
Quit
EndIf

Go to Table of Contents

WIN:At

Module:WIN.NLM
Purpose:Moves the cursor to a new location.
Syntax:Win:At(<iRow>,<iCol>)
Description:WIN:At moves the cursor to a new location inside the default display window. <iRow> is the new row coordinate ranging from 1 to the last row of the display window. <iColumn> is the new column coordinate ranging from 1 to the last column of the window.
Note:When the desktop window (entire screen) is the default window, <iRow> and <iColumn> are absolute coordinates ranging from (1,1) to (25,80). For display windows, the coordinate (1,1) is the upper left corner of the display window, and <iRow> and <iColumn> are the relative coordinates inside the display window.
See Also:WIN:Cursor:Row, WIN:Cursor:Column, WIN:Say, WIN:Get, WIN:Cursor:Show, WIN:Cursor:Hide, Appendicies
Example:WIN:At(4,2)
WIN:Say("Hello network users.")

Go to Table of Contents

WIN:Clear

Module:WIN.NLM
Purpose:Clear a portion or all of the default display window.
Syntax:WIN:Clear([<iRow>])
Description:WIN:Clear clears the default display window starting from the specified row <iRow>. When the optional parameter <iRow> is not specified, WIN:Clear clears the entire window. WIN:Clear does not affect the current cursor location.
Note:When the desktop window (entire screen) is the default window, the absolute coordinate <iRow> ranges from 1 to 25. For display windows, row 1 is the first row of the display window, and <iRow> is the relative row of the display window.
See Also:WIN:At, WIN:Say, WIN:Cursor:Row, WIN:Cursor:Column, Appendicies
Example:WIN:Clear

Go to Table of Contents

WIN:Close

Module:WIN.NLM
Purpose:Close a display or menu window.
Syntax:WIN:Close ([<hHandle>])
Description:WIN:Close closes the display or menu window referred to by <hHandle>. If the optional window handle <hHandle> is not supplied, the default window is presumed. When the default window is closed, the previous window will be selected as default, and if the last window is closed, the desktop window will be selected as default. When a window is closed, all attributes of the window are released from memory, and the window cannot be displayed again unless it is recreated.
Note:The desktop window cannot be closed.
See Also:WIN:Define, WIN:Show, WIN:Hide, Appendicies
Example:TimeVar=SYS:Date:Get
WIN:Clear
Window = WIN:Define(5,20,10,60); WIN:Show
WIN:At(2,10); WIN:Say("Hello network users.")
WIN:At(3,10); WIN:Say("The time is ",TimeVar.Time)
SYS:Delay(3000)
WIN:Close(Window)

Go to Table of Contents

WIN:Color

Module:WIN.NLM
Purpose:Set the color attribute for information displayed in the default window.
Syntax:WIN:Color (<iColor>)
Description:WIN:Color sets the color attribute for WIN:Clear and WIN:Say commands in the default window. The parameter <iColor> is an integer that is the sum of both the foreground and background colors (See: Appendix A - Reserved Colors).
Note:WIN:Color does not affect the border color of the display window. WIN.H must be included in the program in order to take advantage of the reserved color names.
See Also:WIN:Say, WIN:Get, WIN:Clear, Appendicies
Example:DateObj=SYS:Date:Get
Window = WIN:Define(5,20,10,60); WIN:Show
WIN:Color(WIN_FG_RED+WIN_BG_WHITE)
WIN:At(2,10); WIN:Say("Hello network users.")
WIN:Color(WIN_FG_BLUE+WIN_BG_WHITE)
WIN:At(3,10); WIN:Say("The time is ",DateObj.Time)

Go to Table of Contents

WIN:Cursor:Column

Module:WIN.NLM
Purpose:Determine the column number for the current cursor position within the default display window.
Syntax:<iColumn> = WIN:Cursor:Column
Description:WIN:Cursor:Column returns <iColumn> which represents the column number for the cursor position within the default display window. <iColumn> is an integer between 1 and the last column of the default window.
Outputs:Integer
Note:<iColumn> is the relative column position within the default display window. The first column within a display window is column number one. The last column within a display window varies based on the size of the display window.
See Also:WIN:Cursor:Row, WIN:At, WIN:Cursor:Hide, WIN:Cursor:Show
Example:Col=WIN:Cursor:Column
Row=WIN:Cursor:Row
WIN:At(2,1);WIN:Say("Hello Network Users")
WIN:At(Row,Col)

Go to Table of Contents

WIN:Cursor:Hide

Module:WIN.NLM
Purpose:Hide the cursor.
Syntax:<lCursorStatus> = WIN:Cursor:Hide
Description:WIN:Cursor:Hide makes the cursor invisible. WIN:Cursor:Hide returns the logical <lCursorStatus> that represents the previous cursor status. For a previously visible cursor, the logical <lCursorStatus> is true, otherwise it is false.
Outputs:Logical
Note:When the cursor is hidden, commands such as WIN:At, WIN:Say,WIN:Get still update the current cursor position.
See Also:WIN:Cursor:Show, WIN:At, Appendicies
Example:WIN:Cursor:Hide

Go to Table of Contents

WIN:Cursor:Row

Module:WIN.NLM
Purpose:Determine the row number for the current cursor position within thedefault display window.
Syntax:<iRow> = WIN:Cursor:Row
Description:WIN:Cursor:Row returns <iRow> which represents the row number for the current cursor position within the default display window. <iRow> is an integer between 1 and the last row of the default window.
Outputs:Integer
Note:<iRow> is the relative row position within the default display window. The first row within a display window is row number one. The last row within a display window varies based on the size of the display window.
See Also:WIN:Cursor:Column, WIN:At, WIN:Cursor:Hide, WIN:Cursor:Show
Example:Row=WIN:Cursor:Row
Col=WIN:Cursor:Column
WIN:At(2,1);WIN:Say("Hello Network Users")
WIN:At(Row,Col)

Go to Table of Contents

WIN:Cursor:Show

Module:WIN.NLM
Purpose:Make the cursor visible.
Syntax:<lCursorStatus> = WIN:Cursor:Show
Description:WIN:Cursor:Show makes the cursor visible. WIN:Cursor:Show returns the logical <lCursorStatus> that represents the previous cursor status. For a previously hidden cursor, the logical <lCursorStatus> is false, otherwise it is true.
Outputs:Logical
Note:Commands such as WIN:At, WIN:Say, and WIN:Get update the current cursor position.
See Also:WIN:Cursor:Hide, WIN:At, Appendicies
Example:WIN:Cursor:Show

Go to Table of Contents

WIN:Define

Module:WIN.NLM
Purpose:Define a display window.
Syntax:<hHandle> = WIN:Define(<iRow1>, <iColumn1>, <iRow2>, <iColumn2>)
Description:WIN:Define defines a display window and selects it as the default window. The parameters <iRow1>, <iColumn1>, <iRow2> and <iColumn2> specify where on the main screen the display window should appear. The upper left corner of the display window will be at the absolute coordinate (<iRow1>, <iColumn1>). The lower right corner of the display window will be at the absolute coordinate (<iRow2>, <iColumn2>). WIN:Define returns the window handle <hHandle> that refers to the defined display window. When a window is defined, it is not shown until the WIN:Show command is issued.
Outputs:Window handle
Note:Avoid using the WIN:Define command to define a menu window. Such attempts could result in an error message in future releases.
See Also:WIN:Show, WIN:Title, Appendicies
Example:DateObj = SYS:Date:Get
WIN:Clear
Window = WIN:Define(5,20,10,60); WIN:Show
WIN:At(2,10); WIN:Say("Hello network users.")
WIN:At(3,10); WIN:Say("The time is ",DateObj.Time)
SYS:Delay(3000)
WIN:Close(Window)

Go to Table of Contents

WIN:Get

Module:WIN.NLM
Purpose:Define a user input region on the default display window.
Syntax:WIN:Get(Memvar>[,<iWidth>])
Description:WIN:Get defines a user input region on the default display window in reverse colors. The actual input is initiated and displayed when the WIN:Get:Read command is issued. The user input for WIN:Get is placed into the initialized memory variable Memvar>. When multiple WIN:Get commands are used to create several input regions, user input is initiated with a single WIN:Get:Read command and cursor control keys can be used to move around the input regions (See: Appendix E - Edit Field Keys). Optionally, you may limit the number of displayed characters with <iWidth>, and use the cursor control keys to scroll text to the left and right within the edit region. The edit region starts from the current cursor location on the screen.
Note:Both the length of the memory variable Memvar>, and the scroll width <iWidth> affect the size of the input region, and the displayed size is the lesser of the two. WIN:Get updates the current cursor position.
See Also:WIN:At, WIN:Say, WIN:Get:Picture, WIN:Get:Read,WIN:Get:Color, WIN:Get:Clear, WIN:Get:Display,
Example:Name = Str:Repeat(" ", 48)
WIN:At(4,1); WIN:Say("Enter the new user name ")
WIN:Get(Name,10)
ExitKey = WIN:Get:Read
Print(STR:Trim:Right(Name)," is entered")

Go to Table of Contents

WIN:Get:Clear

Module:WIN.NLM
Purpose:Release all pending input regions defined by the WIN:Get command.
Syntax:WIN:Get:Clear
Description:WIN:Get:Clear releases all pending user input regions that are defined by the WIN:Get command. When WIN:Get:Clear is issued, the attributes for all input regions are released from memory and user inputs cannot be initiated by the WIN:Get:Read command.
See Also:WIN:Get, WIN:Get:Read, WIN:Clear
Example:WIN:Get:Clear

Go to Table of Contents

WIN:Get:Color

Module:WIN.NLM
Purpose:Set the color attribute for input regions created in the default window.
Syntax:WIN:Get:Color (<iColor>)
Description:WIN:Get:Color sets the color attribute for input regions created in the default window by the WIN:Get command. The parameter <iColor> is an integer that is the sum of both the foreground and background colors (See: Appendix A - Reserved Colors).
Note:WIN.H must be included in the program in order to take advantage of the reserved color names.
See Also:WIN:Get, WIN:Color
Example:Name = STR:Repeat(" ", 48)
WIN:At(4,1); WIN:Say("Enter the new user name ")
WIN:Get:Color(WIN_FG_WHITE+WIN_BG_BLUE)
WIN:Get(Name)
ExitKey = WIN:Get:Read

Go to Table of Contents

WIN:Get:Display

Module:WIN.NLM
Purpose:Display all input regions created by the WIN:Get command.
Description:WIN:Get:Display displays all input regions created by the WIN:Get command without initiating user inputs. When input regions are created by WIN:Get, they are not displayed until the WIN:Get:Read or WIN:Get:Display command is issued. WIN:Get:Read displays all input regions and initiates user input.
Note:WIN:Get:Display can be used in conjunction with the WIN:Get:Clear command to display information in input regions without initiating user input.
See Also:WIN:Get, WIN:Get:Read, WIN:Get:Clear
Example:WIN:Get:Display

Go to Table of Contents

WIN:Get:Picture

Module:WIN.NLM
Purpose:Specify the format for the input region of the previous WIN:Get command.
Syntax:WIN:Get:Picture(<sFormat>)
Description:WIN:Get:Picture controls how the memory variable is displayed and/or edited within the input region of the WIN:Get command. The parameter <sFormat> specifies an entry template for what was previously called the WIN:Get command. This template identifies which inputs are acceptable for each position within the edit region. The following table shows the meaning of each symbol and applicable data types for templates.
CodePurpose/Acceptable InputsData Type
!Convert to Upper CaseString
9Digits 0 - 9Real, Integer
*Displays * in place of actual characterString, Real, Integer
#Digits 0 - 9, +, -, SpaceString, Real, Integer
ALetters A - Z and a - zString
Ly,Y,n,N,t,T,f,F (Converts Input to T or F)Logical
NDigits 0 - 9 or Letters A - Z and a - zString, Real, Integer
XAny InputString
Yy,Y,n,N (Converts Input to Y or N)Logical
Note:Any unknown symbol used in the template will be entered into the input region as data and cannot be changed by the user.
See Also:WIN:Get, WIN:Get:Read, WIN:Get:Upper, WIN:Get:Clear, WIN:Get:Display
Example:AddUser = False
CountUser = 0
WIN:At(10,2)
WIN:Say("Do You Wish to Add Users? ")
WIN:Get(AddUser)
Rem - force a "Y" or "N" response from the user.
WIN:Get:Picture("Y")
ExitKey = WIN:Get:Read
If (AddUser)
WIN:Get:At(11,2)
WIN:Say("How Many Users Do you Wish to Add? ")
WIN:Get(CountUser)
Rem - Allow up to 4 digits to be entered.
WIN:Get:Picture("9999")
ExitKey = WIN:Get:Read
Endif
SSNo = Str:Repeat(" ",11)
Phone = Str:Repeat(" ",14)
WIN:At(10,2); WIN:Say("Enter Your S.S. Number ")
WIN:Get(SSNo); WIN:Get:Picture("999-99-9999")
WIN:At(11,2); WIN:Say("Enter Your Phone Number ")
WIN:Get(Phone); WIN:Get:Picture("(999) 999-9999")
ExitKey = WIN:Get:Read

Go to Table of Contents

WIN:Get:Read

Module:WIN.NLM
Purpose:Initiates user input within the region defined by the WIN:Get command.
Syntax:<iExitKey> = WIN:Get:Read
Description:WIN:Get:Read displays the input regions defined by the WIN:Get command and places the cursor on the first character of the input region, allowing the user to input information. When multiple WIN:Get commands are issued, a single WIN:Get:Read command will initiate user input for all regions. Cursor control keys (See: Appendix E - Edit Field Keys) can be used to move around the edit regions. When the user terminates the input, the WIN:Get:Read function returns the integer <iExitKey> to represent the key pressed for terminating the input (See: Appendix B - Reserved Key Names).
Outputs:Integer
See Also:WIN:Get, WIN:Get:Picture, WIN:Get:Clear, WIN:Get:Display
Example:#include "KEY.H"
UserName = Str:Repeat(" ",20)
LastName = Str:Repeat(" ",30)
UserPict = Str:Repeat("!",20)
LastPict = Str:Repeat("!",30)
WIN:At(4,1); WIN:Say("Enter The New User Name ")
WIN:Get(UserName); WIN:Get:Picture(UserPict)
WIN:At(5,1); Say("Enter The User Last Name ")
WIN:Get(LastName); WIN:Get:Picture(LastPict)
ExitKey = WIN:Get:Read
If (ExitKey != KEY_ESC)
WIN:At(7,1); WIN:Say("The New User",UserName)
WIN:At(8,1); WIN:Say("User Last Name",LastName)
Endif

Go to Table of Contents

WIN:Get:Upper

Module:WIN.NLM
Purpose:Convert all character inputs for the edit region of WIN:Get to upper case.
Syntax:WIN:Get:Upper
Description:WIN:Get:Upper converts all character inputs for the previous WIN:Get command to upper case.
Note:WIN:Get:Upper only applies to the previous WIN:Get command. The WIN:Get:Picture command also produces the same result, however, the length of the edit region must be known.
See Also:WIN:Get:Picture, WIN:Get, WIN:Get:Read
Example:Server=Str:Repeat(" ",48)
WIN:At(20,1)
WIN:Say("Enter The File Server Name ")
WIN:Get(Server); WIN:Get:Upper
ExitKey=WIN:Get:Read

Go to Table of Contents

WIN:Heading:Off

Module:WIN.NLM
Purpose:Turn off the wallpaper background of the desktop window.
Syntax:WIN:Heading:Off
Description:WIN:Heading:Off turns off the wallpaper background created by the WIN:Heading:On command. When the wallpaper is turned off, the desktop window will display a blank screen. By default, upon start of the program, the wallpaper is not displayed and WIN:Heading:On must be issued to display the wallpaper.
Note:Do not turn the wallpaper background off when any window is visible. The WIN:Heading:Off command should be issued when all other windows are closed.
See Also:WIN:Heading:On
Example:WIN:Heading:On("HiTecSoft Corp.","Example")
Window=WIN:Menu:Define(10,10)
WIN:Menu:Item:Add("Show Active Users")
WIN:Menu:Item:Add("Show Print Jobs")
WIN:Menu:Item:Add("Exit")
WIN:Menu:Start
WIN:Close
WIN:Heading:Off

Go to Table of Contents

WIN:Heading:On

Module:WIN.NLM
Purpose:Display a wallpaper background for the desktop window.
Syntax:WIN:Heading:On (<sTitle1>, <sTitle2>)
Description:WIN:Heading:On displays a wallpaper background for the desktop window. When the wallpaper is displayed, the titles <sTitle1> and <sTitle2> are shown on the top of the screen. By default, upon start of the program, the wallpaper is not displayed, and WIN:Heading:On must be issued to display the wallpaper.
Note:Do not set the wallpaper background on when any window is visible. The WIN:Heading:On command should be issued when all other windows are closed.
See Also:WIN:Heading:Off
Example:WIN:Heading:On("HiTecSoft Corp.","Example")
Window=WIN:Menu:Define(10,10)
WIN:Menu:Item:Add("Show Active Users")
WIN:Menu:Item:Add("Show Print Jobs")
WIN:Menu:Item:Add("Exit")
WIN:Menu:Start
WIN:Close
WIN:Heading:Off

Go to Table of Contents

WIN:Hide

Module:WIN.NLM
Purpose:Hide a window.
Syntax:<hHandle1> = WIN:Hide([<hHandle2>])
Description:WIN:Hide hides the display or menu window referred to by the window handle <hHandle2>. Hidden windows are not visible to the user, however, the window attributes will remain in memory, and the window can be redisplayed using the WIN:Show command. If the parameter <hHandle2> is not specified, the default window will be hidden. When the default window is hidden, the previous window will be selected as the default window. When the last window is hidden, the desktop window is selected. WIN:Hide returns the window handle <hHandle1> that represents the default window prior to executing the WIN:Hide command.
Outputs:Window handle
Note:WIN:Hide does not affect the desktop window.
See Also:WIN:Show, WIN:Close
Example:Window1 = WIN:Define(8,40,14,70); WIN:Show
WIN:At(3,4); WIN:Say("Choose an item.")
SYS:Delay(2000)
WIN:Hide
Window2=WIN:Menu:Define(10,10)
WIN:Menu:Item:Add("Show Active Users")
WIN:Menu:Item:Add("Show Your Pending Print Jobs")
WIN:Menu:Item:Add("Exit")
Choice = WIN:Menu:Start
WIN:Close; WIN:Show(Window1)
WIN:At(3,4); WIN:Say("Processing.....")
SYS:Delay(2000)
WIN:Close

Go to Table of Contents

WIN:Menu:Color

Module:WIN.NLM
Purpose:Set the color attribute for items displayed in the default menu.
Syntax:WIN:Menu:Color (<iColor1>, <iColor2>)
Description:WIN:Menu:Color sets the color attribute for items in the default menu displayed by the WIN:Menu:Start command. When WIN:Menu:Color is not issued, the default color is white on blue for selectable items, gray on blue for unselectable items and blue on white for highlighted items. The parameter <iColor1> is an integer that is the sum of both foreground and background colors for selectable items. The parameter <iColor2> is an integer that is the sum of both foreground and background colors for highlighted items (See: Appendix A - Reserved Colors).
Note:WIN.H must be included in the program in order to take advantage of the reserved color names. The Win:Menu:Item:Color command can be used to change the color for unselectable items.
See Also:WIN:Menu:Item:Color, WIN:Menu:Define
Example:Window = WIN:Menu:Define(10,10)
WIN:Menu:Item:Add(" Show Active Users ")
WIN:Menu:Item:Add(" Show Print Jobs ")
WIN:Menu:Item:Add(" Exit ")
Color1 = WIN_FG_BLACK+WIN_BG_CYAN
Color2 = WIN_FG_WHITE+WIN_BG_RED
WIN:Menu:Color(Color1,Color2)
Choice = WIN:Menu:Start
WIN:Close

Go to Table of Contents

WIN:Menu:Define

Module:WIN.NLM
Purpose:Define a menu window.
Syntax:<hHandle> = WIN:Menu:Define(<iRow>, <iColumn>)
Description:WIN:Menu:Define defines a menu window and selects it as the default window. The parameters <iRow> and <iColumn> specify where on the main screen the menu window should appear. The upper left corner of the menu window will be the absolute coordinate (<iRow>, <iColumn>). The lower right coordinate of the menu window is automatically calculated based on the width and number of items in the menu. WIN:Menu:Define returns the window handle <hHandle> that refers to the menu window defined. When a menu window is defined, it is not displayed until the WIN:Menu:Start command is issued.
Outputs:Window Handle
Note:Avoid using the WIN:Menu:Define command to define a display window. Such attempts could result in an error message in future releases.
See Also:WIN:Show, WIN:Title, WIN:Menu:Start, WIN:Menu:Item:Add, Appendicies
Example:Window=WIN:Menu:Define(10,10)
WIN:Menu:Item:Add("Show Active Users")
WIN:Menu:Item:Add("Show Your Pending Print Jobs")
WIN:Menu:Item:Add("Exit")
WIN:Menu:Start
WIN:Close

Go to Table of Contents

WIN:Menu:Item:Add

Module:WIN.NLM
Purpose:Add an item to a menu window.
Syntax:<iItemNumber> = WIN:Menu:Item:Add(<sItemName>)
Description:WIN:Menu:Item:Add adds the item <sItemName> to the default menu window. Items are displayed inside the menu window in the order added. WIN:Menu:Item:Add returns the integer <iItemNumber> that represents the order in which the item is added to the menu. By default, all items are selectable unless the WIN:Menu:Item:Off command is issued. The menu window and the items are not displayed until the WIN:Menu:Start command is issued.
Outputs:Integer
Note:Avoid adding menu items to display windows. Such attempts could result in an error message in future releases.
See Also:WIN:Menu:Define, WIN:Menu:Start, WIN:Menu:Item:Off, Appendicies
Example:Window=WIN:Menu:Define(10,10)
Item1 = WIN:Menu:Item:Add("Show Active Users")
Item2 = WIN:Menu:Item:Add("Show Print Jobs ")
Item3 = WIN:Menu:Item:Add("Exit ")
Choice = WIN:Menu:Start
WIN:Close

Go to Table of Contents

WIN:Menu:Item:Color

Module:WIN.NLM
Purpose:Set the color for a specific menu item in the menu window.
Syntax:WIN:Menu:Item:Color (<iItemNumber>, <iColor>)
Description:WIN:Menu:Item:Color sets the color attribute for the item number referred to by the integer <iItemNumber>. By default, all menu items are added to the command. The parameter <iColor> is an integer that is the sum of both the foreground and background colors (see: Appendix A - Reserved Colors).
Note:WIN:Menu:Item:Color does not affect the border color of the menu window. WIN.H must be included in the program in order to take advantage of the reserved color names.
See Also:WIN:Menu:Item:Add, WIN:Menu:Color, WIN:Menu:Define
Example:Window = WIN:Menu:Define(10,10)
WIN:Menu:Item:Add("Show Active Users")
WIN:Menu:Item:Add("Show Print Jobs ")
WIN:Menu:Item:Add("Exit ")
MenuColor1 = WIN_FG_WHITE+WIN_BG_MAGENTA
MenuColor2 = WIN_FG_WHITE+WIN_BG_RED
WIN:Menu:Item:Color(2,MenuColor1)
WIN:Menu:Item:Color(3,MenuColor2)
Choice = WIN:Menu:Start
WIN:Close

Go to Table of Contents

WIN:Menu:Item:Name

Module:WIN.NLM
Purpose:Determine the name of a menu item.
Syntax:<sItemName> = WIN:Menu:Item:Name (<iItemNumber>)
Description:WIN:Menu:Item:Name returns the item name <sItemName> for the item number referred to by the integer <iItemNumber>. The returned item name will be the string that was supplied to the WIN:Menu:Item:Add command when the item was added to the menu.
Outputs:String
Note:The order number for each item added to the menu is returned by the command WIN:Menu:Item:Add. WIN:Menu:Item:Color does not affect the border color of the menu window. WIN.H must be included in the program in order to take advantage of the reserved color names.
See Also:WIN:Title, Appendicies
Example:Window=WIN:Menu:Define(10,10)
WIN:Menu:Item:Add("Show Active Users")
WIN:Menu:Item:Add("Show Print Jobs ")
WIN:Menu:Item:Add("Exit ")
Choice = WIN:Menu:Start
ItemName = WIN:Menu:Item:Name(Choice)
WIN:Close
WIN:At(1,1); WIN:Say("You selected ",ItemName)

Go to Table of Contents

WIN:Menu:Item:Off

Module:WIN.NLM
Purpose:Make a menu item unselectable.
Syntax:WIN:Menu:Item:Off (<iItemNumber>)
Description:WIN:Menu:Item:Off makes the menu item specified by the item number <iItemNumber> unselectable. Menu options can be selected by highlighting the desired menu item. When a menu item is unselectable, that item cannot be highlighted.
Note:By default, all menu items defined by WIN:Menu:Item:Add are selectable.
See Also:WIN:Menu:Item:Add,WIN:Menu:Item:On
Example:WIN:Menu:Item:Off(2)

Go to Table of Contents

WIN:Menu:Item:On

Module:WIN.NLM
Purpose:Make a menu item selectable.
Syntax:WIN:Menu:Item:On (<iItemNumber>)
Description:WIN:Menu:Item:On makes the menu item specified by the item number <iItemNumber> selectable. Menu options can be selected by highlighting the desired menu item. When a menu item is selectable, that item can be highlighted.
Note:By default, all menu items defined by WIN:Menu:Item:Add are selectable.
See Also:WIN:Menu:Item:Add, WIN:Menu:Item:Off
Example:WIN:Menu:Item:On(2)

Go to Table of Contents

WIN:Menu:Start

Module:WIN.NLM
Purpose:Activate the menu window defined by the last WIN:Menu:Define command.
Syntax:<hHandle> = WIN:Menu:Start([<iItemNumber>] )
Description:WIN:Menu:Start activates the menu window defined by the last WIN:Menu:Define command and selects it as the default window. When a menu window is activated, all menu items are displayed, and the user can select an item using the menu selection keys. The optional parameter <iItemNumber> specifies the item number that is highlighted upon activation of the menu. When the optional parameter <iItemNumber> is not specified, the first selectable menu item will be highlighted. WIN:Menu:Start returns the integer <hHandle> that represents the selected item.
Outputs:Item handle
Note:When all menu items are unselectable, the menu window will not be activated, and the WIN:Menu:Start command returns zero. The KEY:Last command determines the key that was pressed to select the menu item.
See Also:,"DEFAULT2")); Newline

End sub See Also:
KEY:Last, Appendicies
Example:Window=WIN:Menu:Define(10,10)
WIN:Menu:Item:Add("Show Active Users")
WIN:Menu:Item:Add("Show Your Pending Print Jobs")
WIN:Menu:Item:Add("Exit")
Choice = WIN:Menu:Start(3)
WIN:Close

Go to Table of Contents

WIN:Popup

Module:WIN.NLM
Purpose:Display a maximum of twenty lines of messages on the screen.
Syntax:WIN:Popup (<sMessage1> [, <sMessage2>, <sMessage20>])
Description:WIN:Popup displays a maximum of twenty lines of messages in a window at the center of the screen and will wait until a key is pressed. Each message will appear on a separate line and can be up to 78 characters in length. The first parameter <sMessage1> is required, and all other parameters are optional.
Note:If any of the parameters are more than 78 characters in length, an error message will be issued.
See Also:WIN:At, Appendicies
Example:WIN:Popup("System down in 10 minutes for backup.")

Go to Table of Contents

WIN:Say

Module:WIN.NLM
Purpose:Display information at the current cursor location on the default display window.
Syntax:WIN:Say(Information1>[,<xInformation2>[,...]])
Description:WIN:Say displays information at the current cursor location on the default display window.
Note:The parameters supplied to the WIN:Say command can be any data type. Multiple parameters are separated by commas. WIN:Say updates the current cursor position.
See Also:WIN:At, WIN:Get, WIN:Color, WIN:Clear, Appendicies
Example:NumUsers = 54
WIN:At(4,2); WIN:Say("Hello network users")
WIN:At(5,2); WIN:Say("Number of Users: ",NumUsers)

Go to Table of Contents

WIN:Scroll

Module:WIN.NLM
Purpose:Scroll the contents of a window.
Syntax:WIN:Scroll (<iLines>)
Description:WIN:Scroll scrolls the contents of a window up or down. The parameter <iLines> specifies the number of lines to scroll. When <iLines> is a positive number, the contents of the window will move upward, and blank lines will appear at the bottom of the window. When <iLines> is a negative number, the contents of the window will move downward, and blank lines will appear at the top of the window.
Note:The cursor position will be same as before the Win:Scroll command was executed.
See Also:WIN:Clear,WIN:Say
Example:WIN:Scroll(10)

Go to Table of Contents

WIN:Select

Module:WIN.NLM
Purpose:Select a default window.
Syntax:<hHandle2> = WIN:Select([<hHandle1>])
Description:WIN:Select selects the window referred to by <hHandle1> as the default window. WIN:Select returns the window handle <hHandle2> that represents the default window prior to executing the WIN:Select command.
Outputs:Window handle.
Note:WIN:Select with no parameter returns the default window handle.
See Also:WIN:Show, WIN:Hide, WIN:Define, WIN:Menu:Define
Example:Window1 = WIN:Define(2,2,10,19)
WIN:Show
Window2 = WIN:Define(10,40,18,56)
WIN:Show
WIN:Select(Window1)
WIN:Say("-- Print Jobs --")
WIN:Select(Window2)
WIN:Say("-- User List --")
SYS:Delay(3000)
WIN:Close; WIN:Close

Go to Table of Contents

WIN:Show

Module:WIN.NLM
Purpose:Make a window visible and select it as the default window.
Syntax:<hHandle2> = WIN:Show([<hHandle1>])
Description:WIN:Show makes the window referred to by <hHandle1> visible and selects it as the current default window. When a display window is defined using the WIN:Define command, the window is not shown until the WIN:Show command is issued. WIN:Show also makes hidden windows visible. WIN:Show returns the window handle <hHandle2> that represents the default window prior to executing the WIN:Show command.
Outputs:Window handle
Note:WIN:Show with no parameter will make the default window visible. Usually WIN:Show is used in conjunction with display windows. To activate and make a menu window visible, use the WIN:Menu:Start command.
See Also:WIN:Hide, WIN:Define, WIN:Menu:Define, WIN:Select, Appendicies
Example:Window = WIN:Define(5,20,10,60)
WIN:Show
WIN:At(2,10); WIN:Say("Hello network users.")
SYS:Delay(3000)
WIN:Close

Go to Table of Contents

WIN:Title

Module:WIN.NLM
Purpose:Assign a title to the default window.
Syntax:WIN:Title(<sTitle>)
Description:WIN:Title assigns the title <sTitle> to the default window. When the window is displayed, the title appears on the top window border.
See Also:WIN:Show, WIN:Menu:Start
Example:Window = WIN:Define(5,20,10,60)
WIN:Title(" Welcome Message ")
WIN:Show
WIN:At(2,10); WIN:Say("Hello network users.")
SYS:Delay(3000)
WIN:Close

Go to Table of Contents

WIN:Trim:Off

Module:WIN.NLM
Purpose:Wrap around the displayed strings that exceed the length of the default window.
Syntax:<lTrim> = WIN:Trim:Off
Description:WIN:Trim:Off resets the internal truncate flag to off so that the strings displayed by the WIN:Say command will be wrapped around when the string exceeds the length of the default window. The WIN:Trim:Off command returns the logical <lTrim> which indicates the previous value of the truncate flag, prior to executing the WIN:Trim:Off command.
Note:Strings displayed using the Print command are not affected by the WIN:Trim:Off command. WIN:Trim:Off sets the truncate flag to off for all windows.
See Also:WIN:Trim:On
Example:Window = WIN:Define(11,35,15,45)
WIN:Trim:Off
WIN:Show
WIN:At(1,1); WIN:Say("This is a long message")
SYS:Delay(3000)
WIN:Close

Go to Table of Contents

WIN:Trim:On

Module:WIN.NLM
Purpose:Truncate the displayed strings to the length of the default window.
Syntax:<lTrim> = WIN:Trim:On
Description:WIN:Trim:On sets the internal truncate flag so to on that the strings displayed by the WIN:Say command will be truncated in order to fit within the default window. The WIN:Trim:On command returns the logical <lTrim> which indicates the previous value of the truncate flag, prior to executing the WIN:Trim:On command.
Note:Strings displayed using the Print command are not affected by the WIN:Trim:On command. WIN:Trim:On sets the truncate flag to on for all windows.
See Also:WIN:Trim:Off
Example:Window = WIN_Define(11,35,15,45)
WIN_Trim_On
WIN_Show
WIN_At(1,1); WIN_Say("This is a long message")
SYS_Delay(3000)
WIN_Close

Go to Table of Contents