/* 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 ~= 0 then exit /* Exit if user selected quit NComm */ send username wait "(dots will echo):" if RC ~= 0 then exit /* Exit if user selected quit NComm */ send password clearbuffer /* Release memory allocated by FIFO-buffer */