home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 3 Comm
/
03-Comm.zip
/
lw31.zip
/
LWSCR.INF
(
.txt
)
< prev
next >
Wrap
OS/2 Help File
|
1995-11-06
|
45KB
|
1,421 lines
ΓòÉΓòÉΓòÉ 1. REXX Scripting Functions ΓòÉΓòÉΓòÉ
REXX Scripting Functions
Starting a script
LiveWire includes support for the OS/2 REXX procedure language. LiveWire
scripts may be started in several ways. To start a script from within
LiveWire, open the REXX control panel. Next, select a script from the drop down
listbox of scripts and then press the Play button. Scripts may also be linked
to a particular service entry in the phone book. When the dialer makes a
connection to a service, its script is automatically started.
To launch a script in LiveWire from the OS/2 command line, you must write an
external REXX script that will open the LiveWire terminal and begin the script.
Here is an example of such a script:
/* Open LiveWire Terminal script */
Call RxFuncAdd 'LWLoadFuncs', 'LWREXX', 'LWLoadFuncs'
Call LWLoadFuncs
Ret = LWOpenTerminal(30832, "HOST.CMD");
In this example, the first two lines load the LiveWire REXX library. You should
not change the first two lines. The third line contains the REXX call which
opens the LiveWire terminal (if necessary) and runs a script. There are two
parameters, the first is the hexidecimal Object ID of the LiveWire object. The
second paramters is the filename of the script to run.
The Object ID uniquely identifies a particular LiveWire terminal object your
script will manipulate. To obtain the Object ID of a LiveWire terminal object,
open its settings notebook and go to the last page called Files. The Files
page will contain the unique Object ID.
Note: If the Object ID is wrong, the call will simply fail to open LiveWire or
run the desired script. If this problem occurs, verify you have the proper
Object ID.
Description of functions
REXX is a very powerful script language provided with OS/2. LiveWire extends
the power of REXX by providing a full suite of functions designed to control
communications sessions. Beneath this item is a list of functions that are
added to REXX scripts executed inside LiveWire.
There are two special commands, GetLW and SetLW, which get and set LiveWire
attributes. An attribute is any toggle or setting configurable in LiveWire.
These attributes include cursor location, screen color, phone book entries,
timeout values, terminal emulations, capture, and log. A complete list and
description of all attributes are available beneath the SetLW function.
The rest of the commands handle LiveWire functions, such as hanging up,
dialing, and exiting. Complete descriptions are given beneath this panel. Some
functions include examples, but the best examples are provided in the host mode
script (HOST.CMD) provided with LiveWire 3.0.
REXX extensions
REXX scripts are plain ASCII text, and must end with the .CMD extension.
LiveWire registers itself as a sub-command handler for REXX programs run inside
LiveWire. LiveWire passes on any commands that are not valid functions to the
OS/2 command interpreter. Standard REXX output, tracing output, and error
output are mapped to LiveWire's terminal screen. In addition, LiveWire
redirects the standard REXX output command SAY to to the LiveWire terminal screen.
REXX scripts run from inside LiveWire can be further extended by third party
extensions in order to add features such as multi-threading or PM interfaces.
This manual does not include a complete description of the REXX scripting
language. More information on the REXX scripting language is distributed with
OS/2 as the INF file "REXX Information" normally kept in the Information folder.
ΓòÉΓòÉΓòÉ 1.1. Script commands quick reference ΓòÉΓòÉΓòÉ
Script commands quick reference
The following are all LiveWire defined script functions and attributes. This
page is for quick reference only, see full documentation on each function and
attribute for more information.
Functions defined by LiveWire:
AnsiColor(fg, bg)
ClrScrLW()
DelayLW(ms)
DialLW(markstring)
DiseLW(string)
DispLW(string)
DoMacroLW(keyname)
*DumpScreenLW(filename)
FindLW(string, string, ...)
FlushBufferLW()
GetKeyLocalLW()
GetKeyLW()
GetKeyRemoteLW()
GetLW(attribute)
GetStrLocalLW(string, maxlen)
GetStrLW(string, maxlen)
GetStrRemoteLW(string, maxlen)
HangUpLW()
LogLW(string)
ReceiveFilesLW(protocol, path)
SendBreakLW()
SendFilesLW(protocol, filelist)
SetLW(attribute, attribute_value)
SleepLW(seconds)
WaitTimeLW(hr, min)
Attributes for GetLW and SetLW
BgColor
BSisDEL
*Capture
*CaptureFile
*ConnectPopup
ConnectTimeout
*CurrentDir
*CurrentDisk
CursorX
CursorY
*DataBits
*DialerBits
*DialerDuplex
*DialerEmulation
*DialerInfoFile
*DialerLastCall
*DialerName
*DialerNumber
*DialerOnStartup
*DialerParity
*DialerPassword
*DialerPhoneNumber
*DialerProtocol
*DialerScriptFile
*DialerSpeed
*DialerStop
*DialerTotalCalls
DLDir
*DoorWay
DumpFile
Echo
EchoBack
Editor
Emulation
FgColor
IgnoreCarrier
Linefeeds
LocalOnly
LockedPort
*Log
*LogFile
*MacroFile
Music
Online
Pacing
Parity
*PhoneFile
PipeName
Port
*Printer
*RedialWait
RtsCts
ScrollBack
Speed
StatusLine
StopBits
TimeOut
ULDir
*XlateFile
XonXoff
New commands for LiveWire 3.0 graphical version:
ServiceName
ServiceLastCall
ServiceTotalCalls
ServicePassword
ServiceUserName
ServiceProtocol
* These commands are not unsupported in the graphical version of LiveWire 3.0.
ΓòÉΓòÉΓòÉ 1.2. GetLW(attribute) ΓòÉΓòÉΓòÉ
GetLW(attribute)
GetLW takes an attribute as an argument and returns the current actual value of
the passed attribute. If the value of the attribute is undefined, then the
return value is the empty string or "".
ΓòÉΓòÉΓòÉ 1.3. SetLW(attribute, attribute_value) ΓòÉΓòÉΓòÉ
SetLW(attribute,attribute_value)
SetLW sets a majority of LiveWire program attributes. It takes an attribute
and a corresponding attribute value as arguments. A call to SetLW will attempt
to set the passed LiveWire program attribute to the passed attribute value. If
SUCCESS, the return value is the empty string.
Listed as sub-entries of this command are all the attribute that are Getable
and Setable in LiveWire.
ΓòÉΓòÉΓòÉ 1.3.1. TimeOut ΓòÉΓòÉΓòÉ
TimeOut
TimeOut - represents the LiveWire timeout value in seconds. TimeOut must be
set to an integer value.
Example: SetLW( TimeOut, 45 );
This sets TimeOut to 45 seconds. If TimeOut is set to 0, then there is no
timeout effect in LiveWire at all.
ΓòÉΓòÉΓòÉ 1.3.2. Echoback ΓòÉΓòÉΓòÉ
Echoback
EchoBack - determines whether or not input received over the communications
line should be echoed back.
Example: SetLW( EchoBack, On );
This toggles EchoBack to ON. Similarly, it may be set to OFF with
SetLW( EchoBack, Off );
Integer values may also replace the arguments, where 1=ON and 0=OFF. By
default, EchoBack is OFF.
ΓòÉΓòÉΓòÉ 1.3.3. FgColor ΓòÉΓòÉΓòÉ
FgColor
FgColor - represents the current local LiveWire foreground color. May be set
with colors in the range from 0 to 15, inclusive, integers values only.
Example: SetLW( FgColor, 8 );
This set the foreground color to Dark Grey. The following is the foreground
coloring scheme:
Value Color
----- ----
0 Black
1 Blue
2 Green
3 Cyan
4 Red
5 Magenta
6 Brown
7 White
8 Dark Grey
9 Light Blue
10 Bright Green
11 Bright Blue
12 Bright Red
13 Bright Magenta
14 Yellow
15 White
ΓòÉΓòÉΓòÉ 1.3.4. BgColor ΓòÉΓòÉΓòÉ
BgColor
BgColor - represents the current local LiveWire background color. May be set
with the same values as FgColor, except only the range from 1 to 7.
Note: Clearing the screen after modifying background colors will cause the
entire screen to immediately change to that background color.
ΓòÉΓòÉΓòÉ 1.3.5. CursorX ΓòÉΓòÉΓòÉ
CursorX
CursorX - the cursor X position, where X_Coordinate is an integer value in the
range 1 to 80, inclusive.
ΓòÉΓòÉΓòÉ 1.3.6. CursorY ΓòÉΓòÉΓòÉ
CursorY
CursorY - the cursor position, where Y_Coordinate is an integer value in the
range 1 to screen length, inclusive.
ΓòÉΓòÉΓòÉ 1.3.7. Online ΓòÉΓòÉΓòÉ
Online
Online - determines whether or not LiveWire is currently online. If online,
then the return value is 1. Otherwise, if not online, then the return value is
0. Note: This attribute is only defined for GetLW.
ΓòÉΓòÉΓòÉ 1.3.8. CurrentDir ΓòÉΓòÉΓòÉ
CurrentDir
CurrentDir - represents the current directory.
Example: SetLW( CurrentDir, "C:\LiveWire\Info" );
ΓòÉΓòÉΓòÉ 1.3.9. CurrentDisk ΓòÉΓòÉΓòÉ
CurrentDisk
CurrentDisk - represents the current default disk drive.
Example: SetLW( CurrentDisk, "D:" );.
ΓòÉΓòÉΓòÉ 1.3.10. Emulation ΓòÉΓòÉΓòÉ
Emulation
Emulation - represents the current emulation.
Emulation values are as follows:
0=TTY, 1=ANSI-BBS, 2=OS2YOU, 3=VT-102, 4=0+ Avatar, 5=RIPTerm.
Example: SetLW( Emulation, 1 );
This sets the current emulation to ANSI-BBS.
ΓòÉΓòÉΓòÉ 1.3.11. Capture ΓòÉΓòÉΓòÉ
Capture
Capture - determines whether or not LiveWire should capture sessions. May be
set with ON/OFF, 1/0, where 1=Start Capture and 0=Stop capture.
A third optional parameter (only available with ON setting) specifies the file
to capture to.
Note: When used with GetLW, only returns 1 or 0.
Example: SetLW(Capture, ON);
Example: SetLW(Capture, ON, "Cap.Fil");
Example: SetLW(Capture, OFF);
ΓòÉΓòÉΓòÉ 1.3.12. CaptureFile ΓòÉΓòÉΓòÉ
CaptureFile
CaptureFile - represents the name of the current capture file.
ΓòÉΓòÉΓòÉ 1.3.13. LogFile ΓòÉΓòÉΓòÉ
LogFile
LogFile - represents the name of the current log file.
ΓòÉΓòÉΓòÉ 1.3.14. Log ΓòÉΓòÉΓòÉ
Log
Log - determines whether or not LiveWire's log feature is active.
ΓòÉΓòÉΓòÉ 1.3.15. Echo ΓòÉΓòÉΓòÉ
Echo
Echo - determines whether or not the echo (display) of key presses is on or
off. May be set with attribute values On or Off, 1 or 0, True or False. Note:
When used with GetLW, only returns 1 or 0.
Example: SetLW(Echo, On);
ΓòÉΓòÉΓòÉ 1.3.16. Linefeeds ΓòÉΓòÉΓòÉ
Linefeeds
Linefeeds - determines whether or not automatic line feeds is on or off. May be
set with attribute values On or Off, 1 or 0, True or False. Note: when used
with GetLW, only returns 1 or 0.
ΓòÉΓòÉΓòÉ 1.3.17. RtsCts ΓòÉΓòÉΓòÉ
RtsCts
RtsCts - determines whether or not RTS/CTS flow control is on or off. May be
set with attribute values On or Off, 1 or 0, True or False. Note: When used
with GetLW, only returns 1 or 0.
ΓòÉΓòÉΓòÉ 1.3.18. StatusLine ΓòÉΓòÉΓòÉ
StatusLine
StatusLine - determines whether or not the status line is turned on or off.
Maybe set with attribute values On or Off, 1 or 0, True or False. Note: When
used with GetLW, only returns 1 or 0.
ΓòÉΓòÉΓòÉ 1.3.19. DoorWay ΓòÉΓòÉΓòÉ
Doorway
Doorway - determines whether or not doorway mode is on or off. May be set with
attribute values On or Off, 1 or 0, True or False. Note: When used with
GetLW, only returns 1 or 0.
ΓòÉΓòÉΓòÉ 1.3.20. Printer ΓòÉΓòÉΓòÉ
Printer
Printer - determines whether or not printer capture is on or off. May be set
with attribute values On or Off, 1 or 0, True or False. Note: When used with
GetLW, only returns 1 or 0.
ΓòÉΓòÉΓòÉ 1.3.21. BSisDEL ΓòÉΓòÉΓòÉ
BSisDEL
BSisDEL - determines whether or not the backspace key is equated with the DEL
key. May be set with attribute values On or Off, 1 or 0, True or False. By
default, BSisDel is set OFF. Note: When used with GetLW, only returns 1 or 0.
ΓòÉΓòÉΓòÉ 1.3.22. PhoneFile ΓòÉΓòÉΓòÉ
PhoneFile
PhoneFile - represents the current phone directory file.
ΓòÉΓòÉΓòÉ 1.3.23. MacroFile ΓòÉΓòÉΓòÉ
MacroFile
MacroFile - represents the current macro file.
ΓòÉΓòÉΓòÉ 1.3.24. XlateFile ΓòÉΓòÉΓòÉ
XlateFile
XlateFile - represents the current translation table file.
ΓòÉΓòÉΓòÉ 1.3.25. Port ΓòÉΓòÉΓòÉ
Port
Port - represents the current communications port being used.
ΓòÉΓòÉΓòÉ 1.3.26. Speed ΓòÉΓòÉΓòÉ
Speed
Speed - represents the current modem speed. May be set with any common baud
rate.
Example: SetLW(Speed, 14400);
This sets the modem speed to 14000 baud.
ΓòÉΓòÉΓòÉ 1.3.27. Parity ΓòÉΓòÉΓòÉ
Parity
Parity - represents the current parity checking in effect.
Parity values are as follows:
0=No Parity
1=Even Parity
2=Odd Parity
ΓòÉΓòÉΓòÉ 1.3.28. DataBits ΓòÉΓòÉΓòÉ
DataBits
DataBits - represents the number of databits (7 or 8) used in communication.
The number of databits must be integer values of either 7 or 8.
ΓòÉΓòÉΓòÉ 1.3.29. StopBits ΓòÉΓòÉΓòÉ
StopBits
StopBits - represents the number of stop bits used in communication. The number
of stop bits must be integer values of either 1 or 2.
ΓòÉΓòÉΓòÉ 1.3.30. LockedPort ΓòÉΓòÉΓòÉ
LockedPort
LockedPort - determines whether or not the modem baud rate is locked. May be
set with attribute values On or Off, 1 or 0, True or False.
Note: When used with GetLW, only returns 1 or 0.
ΓòÉΓòÉΓòÉ 1.3.31. PipeName ΓòÉΓòÉΓòÉ
PipeName
PipeName - represents the name of the current named pipe.
ΓòÉΓòÉΓòÉ 1.3.32. XonXoff ΓòÉΓòÉΓòÉ
XonXoff
XonXoff - determines whether or not flow control is on or off. May be set with
attribute values On or Off, 1 or 0, True or False.
Note: When used with GetLW, only returns 1 or 0.
ΓòÉΓòÉΓòÉ 1.3.33. IgnoreCarrier ΓòÉΓòÉΓòÉ
IgnoreCarrier
IgnoreCarrier - determines whether or not to ignore carrier on downloads and
uploads. May be set with attribute values On or Off, 1 or 0, True or False.
Note: When used with GetLW, only returns 1 or 0.
ΓòÉΓòÉΓòÉ 1.3.34. ConnectPopup ΓòÉΓòÉΓòÉ
ConnectPopup
ConnectPopup - determines whether or not to popup a message when connect to
other host. May be set with attribute values On or Off, 1 or 0, True or False.
Note: When used with GetLW, only returns 1 or 0.
ΓòÉΓòÉΓòÉ 1.3.35. Music ΓòÉΓòÉΓòÉ
Music
Music - determines whether or not music is on or off. May be set with
attribute values On or Off, 1 or 0, True or False. By default, music is ON.
Note: When used with GetLW, only returns 1 or 0.
ΓòÉΓòÉΓòÉ 1.3.36. DialerOnStartup ΓòÉΓòÉΓòÉ
DialerOnStartup
DialerOnStartup - determines whether or not to dial a specified phone directory
entry immediately upon LiveWire startup.
ΓòÉΓòÉΓòÉ 1.3.37. ScrollBack ΓòÉΓòÉΓòÉ
ScrollBack
ScrollBack - determines whether or not the scroll back buffer is on or off. May
be set with attribute values On or Off, 1 or 0, True or False. By default
scrollback, is ON.
Note: When used with GetLW, only returns 1 or 0.
ΓòÉΓòÉΓòÉ 1.3.38. ConnectTimeout ΓòÉΓòÉΓòÉ
ConnectTimeout
ConnectTimeout - represents the maximum amount of time LiveWire will wait to
connect to each computer system dialed.
ΓòÉΓòÉΓòÉ 1.3.39. RedialWait ΓòÉΓòÉΓòÉ
RedialWait
RedialWait - represents the amount of time LiveWire will wait between dialing
attempts.
ΓòÉΓòÉΓòÉ 1.3.40. Pacing ΓòÉΓòÉΓòÉ
Pacing
Pacing - sets the character inter-pacing value. If the pacing value is set to
0, then pacing has no effect. Must be set with integer values where the pacing
rate is effectively measured in milliseconds.
ΓòÉΓòÉΓòÉ 1.3.41. Editor ΓòÉΓòÉΓòÉ
Editor
Editor - represents the full path of the current default LiveWire text editor.
ΓòÉΓòÉΓòÉ 1.3.42. ULDir ΓòÉΓòÉΓòÉ
ULDir
ULDir - represents the directory where uploaded files will go. If this value is
"", then the upload directory is the current directory.
ΓòÉΓòÉΓòÉ 1.3.43. DLDir ΓòÉΓòÉΓòÉ
DLDir
DLDir - represents the directory where downloaded files will go. If this value
is "", then the download directory is the current directory.
ΓòÉΓòÉΓòÉ 1.3.44. DumpFile ΓòÉΓòÉΓòÉ
DumpFile
DumpFile - represents current dump file name including path.
ΓòÉΓòÉΓòÉ 1.3.45. MacroFile ΓòÉΓòÉΓòÉ
MacroFile
MacroFile - represents the name of the current macro file including path.
ΓòÉΓòÉΓòÉ 1.3.46. LocalOnly ΓòÉΓòÉΓòÉ
LocalOnly
LocalOnly - determines whether or not your script should send output to the
modem. When set to 0, Off, or False output from your script may be sent to the
modem. If set to 1, On, or True output is restricted to the local system. By
default, LocalOnly is set to OFF.
Note: When used with GetLW, only returns 1 or 0.
ΓòÉΓòÉΓòÉ 1.3.47. DialerNumber ΓòÉΓòÉΓòÉ
DialerNumber
DialerNumber - The current dialing entry number being modified. If the script
was run automatically from the dialer after connecting, this attribute will be
set to the dialing entry connected to.
ΓòÉΓòÉΓòÉ 1.3.48. DialerName ΓòÉΓòÉΓòÉ
DialerName
DialerName - The name of the current entry in the dialing directory.
ΓòÉΓòÉΓòÉ 1.3.49. DialerPhoneNumber ΓòÉΓòÉΓòÉ
DialerPhoneNumber
DialerPhoneNumber - The number of the current entry in the dialing directory.
ΓòÉΓòÉΓòÉ 1.3.50. DialerInfoFile ΓòÉΓòÉΓòÉ
DialerInfoFile
DialerInfoFile - The name of the comments/information file of the current entry.
ΓòÉΓòÉΓòÉ 1.3.51. DialerScriptFile ΓòÉΓòÉΓòÉ
DialerScriptFile
DialerScriptFile - The name of the script file of the current entry.
ΓòÉΓòÉΓòÉ 1.3.52. DialerSpeed ΓòÉΓòÉΓòÉ
DialerSpeed
DialerSpeed - The communications speed of the current entry.
ΓòÉΓòÉΓòÉ 1.3.53. DialerParity ΓòÉΓòÉΓòÉ
DialerParity
DialerParity - The parity of the current entry. (N, E, or O)
ΓòÉΓòÉΓòÉ 1.3.54. DialerBits ΓòÉΓòÉΓòÉ
DialerBits
DialerBits - The data bits of the current entry. (7 or 8)
ΓòÉΓòÉΓòÉ 1.3.55. DialerStop ΓòÉΓòÉΓòÉ
DialerStop
DialerStop - The stop bits of the current entry. (1 or 2)
ΓòÉΓòÉΓòÉ 1.3.56. DialerDuplex ΓòÉΓòÉΓòÉ
DialerDuplex
DialerDuplex - The duplex of the current entry. (F=Full, H=Half)
ΓòÉΓòÉΓòÉ 1.3.57. DialerPassword ΓòÉΓòÉΓòÉ
DialerPassword
DialerPassword - The password of the current entry.
ΓòÉΓòÉΓòÉ 1.3.58. DialerProtocol ΓòÉΓòÉΓòÉ
DialerProtocol
DialerProtocol - The hotkey (highlighted character in the menu) of the protocol
of the current entry. (EG: Zmodem is Z, Xmodem-1K is 1)
ΓòÉΓòÉΓòÉ 1.3.59. DialerEmulation ΓòÉΓòÉΓòÉ
DialerEmulation
DialerEmulation - The emulation of the current entry.
ΓòÉΓòÉΓòÉ 1.3.60. DialerLastCall ΓòÉΓòÉΓòÉ
DialerLastCall
DialerLastCall - The date of the last call of the current entry.
ΓòÉΓòÉΓòÉ 1.3.61. DialerTotalCalls ΓòÉΓòÉΓòÉ
DialerTotalCalls
DialerTotalCalls - The number of total calls to the current entry.
ΓòÉΓòÉΓòÉ 1.3.62. ServiceName ΓòÉΓòÉΓòÉ
ServiceName
Name of the service currently connected to.
Available only in LiveWire 3.0 graphical mode.
ΓòÉΓòÉΓòÉ 1.3.63. ServiceLastCall ΓòÉΓòÉΓòÉ
ServiceLastCall
Last date the service currently connected to was called.
Available only in LiveWire 3.0 graphical mode.
ΓòÉΓòÉΓòÉ 1.3.64. ServiceTotalCalls ΓòÉΓòÉΓòÉ
ServiceTotalCalls
Total number of calls made to the service currently connected to.
Available only in LiveWire 3.0 graphical mode.
ΓòÉΓòÉΓòÉ 1.3.65. ServiceProtocol ΓòÉΓòÉΓòÉ
ServiceProtocol
Name of the protocol assigned to the service currently connected to.
Available only in LiveWire 3.0 graphical mode.
ΓòÉΓòÉΓòÉ 1.3.66. ServiceUserName ΓòÉΓòÉΓòÉ
ServiceUserName
User name assigned to the service currently connected to.
Available only in LiveWire 3.0 graphical mode.
ΓòÉΓòÉΓòÉ 1.3.67. ServicePassword ΓòÉΓòÉΓòÉ
ServicePassword
Password assigned to the service currently connected to.
Available only in LiveWire 3.0 graphical mode.
ΓòÉΓòÉΓòÉ 1.4. DispLW(string) ΓòÉΓòÉΓòÉ
DispLW(string)
Disp(string) - displays a string locally (i.e. does not send it over the
modem), where <string> is a string of text enclosed in a pair of quotes or the
name of a string variable.
The passed string may include any special control characters following special
characters, for example:
^M = carriage return
^J = line feed
^G = Bell
^M^J would be a carriage return immediately followed by a line feed.
Example:
DispLW("This will display a string and drop down to the next line^M^J");
ΓòÉΓòÉΓòÉ 1.5. SendLW(string) ΓòÉΓòÉΓòÉ
SendLW(string)
SendLW(string) - sends a string over the modem, but does not display it to the
screen, where <string> is a string of text enclosed in a pair of quotes or the
name of a string variable.
The passed string may include any special control characters following special
characters, for example:
^M = carriage return (or ENTER)
^J = line feed
^G = Bell
^M^J would be a carriage return immediately followed by a line feed.
Example:
DispLW("This will send a string to the modem and press [ENTER]^M");
ΓòÉΓòÉΓòÉ 1.6. DiseLW(string) ΓòÉΓòÉΓòÉ
DiseLW(string)
DiseLW(str) - sends a string over the modem and displays it locally as well,
where <str> is a string of text enclosed in a pair of quotes or the name of a
string variable.
The passed string may include any special control characters following special
characters, for example:
^M = carriage return (or ENTER)
^J = line feed
^G = Bell
^M^J would be a carriage return immediately followed by a line feed.
Example:
DispLW("This will send a string to the modem and display it on the LiveWire screen^M");
ΓòÉΓòÉΓòÉ 1.7. FindLW(string, string, ) ΓòÉΓòÉΓòÉ
FindLW(string, string, ...)
FindLW(string, string, ... ) - Waits until one of the strings <string> is found
in the information being received over the modem, where <string> is a string of
text enclosed in a pair of quotes or the name of a string variable. Find may
look for up to 10 strings. The command fails if it cannot find one of the
strings in the amount of time specified in the TIMEOUT variable. Upon timeout,
FindLW returns the string "TIMEOUT", otherwise it returns the string it found.
Note that if timeout is zero, FindLW will not timeout.
Note: The passed strings may include the following special characters: ^M =
carriage return, ^J = line feed, and ^G = Bell. For example, ^M^J would be a
carriage return immediately followed by a line feed.
ΓòÉΓòÉΓòÉ 1.8. GetKeyLW() ΓòÉΓòÉΓòÉ
GetKeyLW()
GetKeyLW() - returns a single keystroke of input from either the local end or
remote computer.
ΓòÉΓòÉΓòÉ 1.9. GetKeyLocalLW() ΓòÉΓòÉΓòÉ
GetKeyLocalLW()
GetKeyLocalLW() - returns a singe keystroke of input from the local end of LiveWire.
ΓòÉΓòÉΓòÉ 1.10. GetKeyRemoteLW() ΓòÉΓòÉΓòÉ
GetKeyRemoteLW()
GetKeyRemoteLW( ) - returns a single keystroke of input from the remote computer.
ΓòÉΓòÉΓòÉ 1.11. GetStrLW(string, maxlen) ΓòÉΓòÉΓòÉ
GetStrLW(string, maxlen)
GetStrLW(string, maxlen) - receives a full string from either the local or
remote end and returns a string typed or edited by the user. The string is
ended when <ENTER> is pressed. If a string <string> is specified, the string
appears for the user to edit. The string will not be allowed to exceed the
maximum length specified by <maxlen>. The size of the passed string <string>
cannot exceed the length. specified by <maxlen>. By default, <maxlen> is 78.
Example:
Name=GetStrLW("Les",15);
Would display the name "Les" for editing. Up to a maximum of 15 characters can
be entered. When <ENTER> is pressed the variable "Name" gets the edited string.
ΓòÉΓòÉΓòÉ 1.12. GetStrLocalLW(string, maxlen) ΓòÉΓòÉΓòÉ
GetStrLocalLW(string, maxlen)
GetStrLocalLW(string, maxlen ) - this command is similar to GetStrLW except
that GetStrLocalLW gets a string only from the local keyboard. Also, the
editing provided is much more powerful than GetStrLW since it allows full
editing of the variable with arrow, insert, and delete keys.
ΓòÉΓòÉΓòÉ 1.13. GetStrRemoteLW(string, maxlen) ΓòÉΓòÉΓòÉ
GetStrRemoteLW(string, maxlen)
GetStrRemoteLW(string, maxlen) - similar to GetStrLW, except this command only
receives a string from the remote computer.
ΓòÉΓòÉΓòÉ 1.14. DialLW(markstring) ΓòÉΓòÉΓòÉ
DialLW(markstring)
DialLW(markstring) - marks and dials a range of entries based upon a given mark
string, specified by the string <markstring>. The mark string allows you to
mark entries by name, part of a name, or entry number. Here are some examples:
1,10,50,3
Marks entries 1, 10, 50, and 3
1,5..20
Marks entries 1, and all entries 5 through 20, inclusive.
1..20,25..200
Marks entries 1 through 20 and 25 through 200, inclusive.
DataMirage
Marks all entries that contain "DataMirage"
Data
Marks all entries that contain "Data". Note that this will match entries such
as "DataMirage", The DATA Line", and "My Data". Also, this is case insensitive.
1,Data,5..20
Marks entry 1, all entries containing "Data", and entries 5 through 20, inclusive.
ΓòÉΓòÉΓòÉ 1.15. ClrScrLW() ΓòÉΓòÉΓòÉ
ClrScrLW()
ClrScrLW() - clears the local screen.
ΓòÉΓòÉΓòÉ 1.16. SendBreakLW() ΓòÉΓòÉΓòÉ
SendBreakLW()
SendBreakLW() - sends a break signal over the modem for 1/4 of a second.
ΓòÉΓòÉΓòÉ 1.17. SendFilesLW(protocol, filelist) ΓòÉΓòÉΓòÉ
SendFilesLW(protocol, filelist)
SendFilesLW(protocol, filelist)
Sends (uploads) one or more files over the modem using the specified protocol,
where <protocol> is a string variable that should contain a single character
which is the hotkey of the protocol to use. The hotkeys are the letters that
are highlighted in the protocol listing when you press <PgUp>. For example,
Zmodem would be Z. Xmodem would be X. Xmodem-1K would be 1.
<filelist> is a list of quote-enclosed files and their paths to send all in one
string. Long filenames and filenames with spaces are accepted. If you wish to
send only one file, there is no need to enclose the file in double quotes.
Wildcards are not accepted.
For example:
SendFilesLW(Z, '"C:\COMMAND.COM" "F:\LW22\LW22.EXE"');
SendFilesLW(Z, 'C:\AUTOEXEC.BAT');
Returns "0" on success, otherwise failure.
Specific failure codes may be added in future versions of LiveWire.
ΓòÉΓòÉΓòÉ 1.18. ReceiveFilesLW(protocol, path) ΓòÉΓòÉΓòÉ
ReceiveFilesLW(protocol, path)
ReceiveFilesLW(protocol, path)
Receives (downloads) one or more files over the modem using the specified
protocol, where <protocol> is a string variable that should contain a single
character which is the hotkey of the protocol to use. The hotkeys are the
letters that are highlighted in the protocol listing when you press <PgDn>.
For example, Zmodem would be Z. Xmodem would be X. Xmodem-1K would be 1.
<path> is the directory to place the received files into for batch protocols.
For single-file protocols (Xmodem, Xmodem-1K, Xmodem CRC), <path> is the full
filespec of the file being received. If <path> is the empty string (""),
received files are placed in the default download directory.
For example:
ReceiveFilesLW(Z, "");
ReceiveFilesLW(Z, "C:\DOS");
ReceiveFilesLW(X, "C:\DOS\COMMAND.COM");
Returns "0" on success, otherwise failure.
Specific failure codes may be added in future versions of LiveWire.
ΓòÉΓòÉΓòÉ 1.19. AnsiColorLW(fg, bg) ΓòÉΓòÉΓòÉ
AnsiColorLW(fg, bg)
AnsiColorLW(fg,bg) - sends an ANSI code over the modem that changes the remote
terminal color. <fg> is the foreground color. <bg> is the background color.
ΓòÉΓòÉΓòÉ 1.20. DumpScreenLW(filename) ΓòÉΓòÉΓòÉ
DumpScreenLW(filename)
DumpScreenLW(filename) - dumps the current screen to <filename>, the specified
dump file.
ΓòÉΓòÉΓòÉ 1.21. ExitLW() ΓòÉΓòÉΓòÉ
ExitLW()
ExitLW() - exits the LiveWire program.
ΓòÉΓòÉΓòÉ 1.22. DelayLW(ms) ΓòÉΓòÉΓòÉ
DelayLW(ms)
DelayLW(ms) - delays for <ms> milliseconds before resuming the script.
ΓòÉΓòÉΓòÉ 1.23. SleepLW(seconds) ΓòÉΓòÉΓòÉ
SleepLW(seconds)
SleepLW(seconds) - sleeps (does nothing) for <seconds> amount of time before
resuming the script.
ΓòÉΓòÉΓòÉ 1.24. WaitTimeLW(hr, min) ΓòÉΓòÉΓòÉ
WaitTimeLW(hr, min)
WaitTime(hr, min) - waits until the current time is <hr>:<mn> (in 24 hour
military time) before resuming the script. During the wait time, the session
continues. Therefore, this command can be used to capture data from a start
time to end time.
ΓòÉΓòÉΓòÉ 1.25. HangUpLW() ΓòÉΓòÉΓòÉ
HangUpLW()
HangUpLW() - attempts to disconnect the current modem session.
Returns "1" on success (modem reports offline status), "0" on failure (modem
reports online status).
ΓòÉΓòÉΓòÉ 1.26. DoMacroLW() ΓòÉΓòÉΓòÉ
DoMacroLW()
DoMacroLW(<key name>) - executes a macro given a key name.
Example:
DoMacroLW("F1");
DoMacroLW("ALT-X");
Warning: This function has had minimal testing and is not guaranteed to work
except for macros containing strictly ASCII text or the {PASSWORD} command. All
other macro commands may or may not work.
ΓòÉΓòÉΓòÉ 1.27. FlushBufferLW() ΓòÉΓòÉΓòÉ
FlushBufferLW()
FlushBufferLW() - Flushes the incoming and outgoing data buffers.
ΓòÉΓòÉΓòÉ 1.28. LogLW() ΓòÉΓòÉΓòÉ
LogLW()
LogLW(<str>) - Creates an entry in the log file. The time and date are
automatically stamped.
Example:
LogLW("Hanging up");
LogLW("Phone rang");
ΓòÉΓòÉΓòÉ 2. Learning scripts ΓòÉΓòÉΓòÉ
Learning scripts
LiveWire has the capability to record part or all of a communications session
and play it back automatically. This is called script record or script learn.
LiveWire accomplishes this "recording" by assuming that the service you are
connected to will be sending a prompt (eg: Enter Your Name or Press Any Key...)
and that you will respond by typing a response. LiveWire remembers what you
type at each prompt and responds in the same manner next time it sees these prompts.
The following runs through an example learning session in the graphical version:
First, open the phone book and edit the service you wish to attach a recorded
logon script. In the edit window there is a drop-down list field called Script
Name. Change this from <None> to <Record logon> and press the Save button to
save the entry.
Now, dial the service. Afer you connect, LiveWire will automatically start
recording. The REXX Script Control Panel will appear.
Logon normally to the service, but take care to note how much of your logon you
want LiveWire to record. For example, on most services you would only need
LiveWire to record when you type your name and password. Beyond this the
service you call probably changes daily. If so, LiveWire will be confused
because it isn't smart enough to adapt to these changes.
When you are ready to stop recording, press the STOP button in the REXX Control
Panel. You will be asked to name your script. After you have named and saved
your script, go back into the phone book and set the Script Name field to the
logon script you just recorded.
That's it! Next time you connect to the serv the script will automatically run.
The following runs through an example learning session in the text mode version:
The first thing you must do is find a service you want to call in your phone
directory and put a filename in the "Script" field. To edit this entry press
"E" while the highlight bar is on the entry. When the edit window appears, move
your highlight bar to the entry "Script" and press ENTER. Now type a filename,
ending with the extension .CMD, into this field and press ENTER. Then press Esc
to save this entry.
Now, dial the service. Note that as you dial an "L" appears next to the entry
where a check mark normally appears. This means that LiveWire will
automatically start learning as soon as you get onto the service.
Logon normally to the service, but take care to note of how much of your logon
you want LiveWire to remember. For example, on most services you would only
need LiveWire to remember when you type your name and password. Beyond this
(reading bulletins and messages) the service you call probably changes daily.
If so, LiveWire will become confused. It isn't smart enough to adapt to these changes.
When you are ready to have LiveWire stop learning, look at the status line on
your screen. It will tell you what keys you need to press to stop script learning.
That's it! Next time you call the same service LiveWire should automatically
replay what it learned, key for key. If for some reason LiveWire did not learn
correctly or you made a mistake while it was learning you can change the name
of the script filename in the phone book entry or erase the script file.
TIPS FOR LEARNING: (text mode version)
LiveWire makes the assumption that when you press ENTER you are finished typing so...
- Press ENTER after each prompt, if possible
- The use of hotkeys ( selection of an option without having to press ENTER)
may not work
ΓòÉΓòÉΓòÉ 2.1. Editing a learned script file ΓòÉΓòÉΓòÉ
Editing a learned script file
Editing a script file associated with a service in the dialer is simple. Go
into the dialer and move the highlight bar to the service, then press the V
(for View Script) key. After a few seconds an editor will come up with the
learned script.
If you intend to fix the script, the first thing you need to know is at what
point the script is failing. For example, if the script never responds to a
"PASSWORD:" prompt then you know that it is not recognizing the prompt correctly.
Move your cursor to the place in the script which has the command to find the
password prompt. This may look like:
FindLW("PASSWORD:");
Any small difference in the actual prompt and the prompt LiveWire expects will
cause a problem. Some things to look for are:
+ Time/Date dependent information is part of the prompt
EG: "(23 minutes left) COMMAND:"
this should be changed to "COMMAND:"
+ Spaces where they do not belong
+ Odd control (^) characters
+ Line noise
+ The system prompt changed since you learned the script!
ΓòÉΓòÉΓòÉ 3. Host mode script ΓòÉΓòÉΓòÉ
Host mode script
LiveWire 3.0 includes a Host Mode REXX script. The host mode script allows a
computer to accept incoming calls. Callers can access the remote computer and
do the following functions:
- Transfer files
- Send messages
- Chat with you
The host mode included is by intended for simple purposes only and is not
robust or complete enough to serve as a full bulletin board or service. The
host might be useful if you have a co-worker or friend who needs to call up to
your system and get a file. In addition, he might also leave you a short
message. The host could also be useful if you frequently exchange files from
your home to the office via modem. The host is also a good example of how to
program REXX scripts under LiveWire.
In the graphical version of LiveWire you must start the host mode from the REXX
Control panel. First select Host Mode Script from the drop down list of script
names, then press the Play button. Typing the parameter LOCAL before you press
Play causes Host mode to go into local call mode instead of waiting for a
remote call.
In the text mode version of LiveWire you must start the host mode you must
invoke it from LiveWire's command menu. The only parameter it recognizes is
"LOCAL". If you type LOCAL as a parameter, the Host Mode will not wait for an
incoming call, but instead will allow you to login locally.
Host mode expects that the modem is setup correctly. Before running host mode
make sure that:
1. The modem is NOT in auto-answer mode
2. The modem returns text response codes
3. The modem speed is set properly
4. If necessary, the modem's port speed is locked properly
By default the host stores its messages and files in the LiveWire directory in
the HSTFILES and HSTMSGS directories, which are automatically created by the
script. These directories can be changed using the sysop menu inside the host.
The default sysop password is "PASSWORD."
If you have a special need that the host mode script does not address, feel
free to modify the script. The script is not copyrighted, so any changes made
may be re-distributed freely.
ΓòÉΓòÉΓòÉ 4. REXX Script Manual For LiveWire 3.0 ΓòÉΓòÉΓòÉ
LiveWire/WPS 3.0
Rexx Script Manual
Copyright 1995 Les Novell