home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
339.lha
/
SerMod
/
Docs
/
MATCH.doc
< prev
next >
Wrap
Text File
|
1990-02-08
|
1KB
|
52 lines
NAME: MATCH
SYNTAX: MATCH <n> 'String'
MATCH <n>
MATCH CLEAR
DESCRIPTION:
This command tells the serial module to watch for a pattern
coming in on the receive line. The pattern will be matched
exactly as given by the 'String' argument. The 'String' argument
will be case sensitive, and if quotes are not used, the match
will be on an upper case representation of the string only.
When a string is matched, a message will be sent to the
CTRL port. It will have the form: MATCH <n>
The MATCH, when used with a number only and no string, will clear
only that MATCH number.
The CLEAR operand will clear all the patterns currently in
memory.
NOTES:
It is possible to match on a string that spans more than one line
by including the <CR> or linefeed character in the string passed
as a pattern.
In order for a script to be signalled when a match occurs, you
must have previously issued a 'SCAN ON' command. To disable the
matching, issue a SCAN OFF command.
EXAMPLE:
MATCH 0 'Hello'
MATCH 1 'CONNECT' || '0a'x
MATCH 2 hello
MATCH 2
MATCH CLEAR
In the above examples, the following strings will be matched:
Hello
CONNECT<LF> (the linefeed character was concatenated to the pattern)
HELLO (the string was not quoted)
none... the MATCH for 2 was cleared
none... all matches were cleared
SEE ALSO: SCAN, STATUS