Specifications
OLE reference
Gallagher & Robertson Glink: API reference manual 159
The Receive method
Waits for one of the defined characters from the host
Receive ( Maxlen, Waitchars, Timeout, Process )
Maxlen: Integer Max number of host data to receive
Waitchars: String Characters to wait for
Timeout: Integer Max millisecond to wait receive
Process: Boolean Process host data received
Return value: String Received data from the host
This method returns the string of characters received from the host. It will stop
receiving when any of the characters in the Waitchars string is received from the
host or if the Timeout has elapsed or if the MaxLen number of characters has
been received. If the Process variable is TRUE, then the characters will be
processed and displayed in the emulation window as they arrive from the host. If
set to FALSE, then it will be up to the automation controller to return them by
using the Emulate method if required. If the no data has arrived before the
Timeout elapses, then the string will be empty
To have full control over the host data, you should set the ProcessLine property
to FALSE otherwise data will be automatically emulated by Glink when there is
no outstanding Receive method being called.
VBA Example:
Dim S As String
S = GL.Receive(100, String(1, Chr(03)), 100, True)
If InStrB(S, "MODEL") > 0 Then
GL.Transmit ("VIP7804")
End If
The ScriptCommand method
Executes a script command
ScriptCommand ( Command )
Command: String Script command to execute
Return value: none