home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 16
/
amigaformatcd16.iso
/
-in_the_mag-
/
top100_shareware
/
comms
/
ncomm
/
scripts
/
rxread3.ncomm
< prev
next >
Wrap
Text File
|
1993-03-06
|
879b
|
25 lines
/* This is a very simple logon script for MBBS systems that demonstrates */
/* the third way to wait for data: waiting for a string. This script could */
/* of course be made a lot more advanced by using WAIT '0A'X and the */
/* inactivity command (see readser2.ncomm). That way, you may even include */
/* WHEN-style checking (like in the NComm script-language) by for example */
/* using the ARexx lastpos() function... (searches for a pattern in string) */
username = "TORKEL LODBERG\n"
password = "\p\n"
options results /* Turn on result codes */
address 'ncomm' /* Our port name */
inactivity 0 /* Wait forever */
wait "FIRST name"
if RC == 20 then exit /* Exit if user selected quit NComm */
send username
wait "(dots will echo):"
if RC == 20 then exit /* Exit if user selected quit NComm */
send password
clearbuffer /* Release memory allocated by FIFO-buffer */