Open-Source-Software-Entwicklung und Downloads

Browse Subversion Repository

Diff of /trunk/doc/en/html/macro/command/waitregex.html

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3226 by maya, Tue Mar 24 09:37:20 2009 UTC revision 3227 by maya, Tue Mar 24 15:10:33 2009 UTC
# Line 1  Line 1 
1  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
2    "http://www.w3.org/TR/html4/strict.dtd">    "http://www.w3.org/TR/html4/strict.dtd">
3  <html>  <html>
4  <head>  <head>
5    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
6    <title>waitregex</title>    <title>waitregex</title>
7    <meta http-equiv="Content-Style-Type" content="text/css">    <meta http-equiv="Content-Style-Type" content="text/css">
8    <link rel="stylesheet" href="../../style.css" type="text/css">    <link rel="stylesheet" href="../../style.css" type="text/css">
9  </head>  </head>
10    
11  <body>  <body>
12    
13    
14  <h1>waitregex</h1>  <h1>waitregex</h1>
15    
16  <p>  <p>
17  Waits a line that contains string with regular expression.  Waits a line that contains string with regular expression.
18  </p>  </p>
19    
20  <pre class="macro-syntax">  <pre class="macro-syntax">
21  waitregex &lt;string1 with regular expression&gt; [&lt;string2 with regular expression&gt; ...]  waitregex &lt;string1 with regular expression&gt; [&lt;string2 with regular expression&gt; ...]
22  mwaitregex &lt;string1 with regular expression&gt; [&lt;string2 with regular expression&gt; ...]  mwaitregex &lt;string1 with regular expression&gt; [&lt;string2 with regular expression&gt; ...]
23  </pre>  </pre>
24    
25  <h2>Remarks</h2>  <h2>Remarks</h2>
26    
27  <p>  <p>
28  Supports <a href="../../reference/RE.txt">Oniguruma Regular Expressions</a>.<br>  Supports <a href="../../reference/RE.txt">Oniguruma Regular Expressions</a>.<br>
29  Pauses until the string (maximum 256 characters), which matches one or more character strings with regular expression is received from the host, or until the timeout occurs. Maximum number of the regular expression strings is 10.  Pauses until the string (maximum 256 characters), which matches one or more character strings with regular expression is received from the host, or until the timeout occurs. Maximum number of the regular expression strings is 10.
30  </p>  </p>
31    
32  <p>  <p>
33  If the system variable "timeout" or "mtimeout" is greater than zero, the timeout occurs when &lt;timeout&gt;.&lt;mtimeout&gt; seconds have passed. If the timeout is less than or equal to zero, the timeout never occurs.  If the system variable "timeout" or "mtimeout" is greater than zero, the timeout occurs when &lt;timeout&gt;.&lt;mtimeout&gt; seconds have passed. If the timeout is less than or equal to zero, the timeout never occurs.
34  </p>  </p>
35    
36  <p>  <p>
37  These commands return one of the following values in the system variable "result":  These commands return one of the following values in the system variable "result":
38  </p>  </p>
39    
40  <table>  <table>
41   <tr>   <tr>
42    <th>Value</th>    <th>Value</th>
43    <th>Meaning</th>    <th>Meaning</th>
44   </tr>   </tr>
45   <tr>   <tr>
46    <td>0</td>    <td>0</td>
47    <td>Timeout.</td>    <td>Timeout.</td>
48   </tr>   </tr>
49   <tr>   <tr>
50    <td>1</td>    <td>1</td>
51    <td>&lt;string1 with regular expression&gt; has received.</td>    <td>&lt;string1 with regular expression&gt; has received.</td>
52   </tr>   </tr>
53   <tr>   <tr>
54    <td>2</td>    <td>2</td>
55    <td>&lt;string2 with regular expression&gt; has received.</td>    <td>&lt;string2 with regular expression&gt; has received.</td>
56   </tr>   </tr>
57   <tr>   <tr>
58    <td>n</td>    <td>n</td>
59    <td>&lt;stringn with regular expression&gt; has received. n=1..10.</td>    <td>&lt;stringn with regular expression&gt; has received. n=1..10.</td>
60   </tr>   </tr>
61  </table>  </table>
62    
63  <p>  <p>
64  The received line is stored in the system variable "inputstr".<br>  The received line is stored in the system variable "inputstr".<br>
65  The first matched pattern is stored in the system variable "matchstr".<br>  The first matched pattern is stored in the system variable "matchstr".<br>
66  Group matched patterns of regular expressions are stored in 9 system variables from "groupmatchstr1" to "groupmatchstr9".  Group matched patterns of regular expressions are stored in 9 system variables from "groupmatchstr1" to "groupmatchstr9".
67  </p>  </p>
68    
69  <h2>Example</h2>  <h2>Example</h2>
70    
71  <pre class="macro-example">  <pre class="macro-example">
72  timeout = 30  timeout = 30
73  waitregex 'Longhorn' '.*@sai' 'Pentium\d+' 'TeraTermX{3}'  waitregex 'Longhorn' '.*@sai' 'Pentium\d+' 'TeraTermX{3}'
74  int2str s result  int2str s result
75  messagebox s 'result'  messagebox s 'result'
76  messagebox inputstr 'inputstr'  messagebox inputstr 'inputstr'
77  messagebox matchstr 'matchstr'  messagebox matchstr 'matchstr'
78  </pre>  </pre>
79    
80  </body>  </body>
81  </html>  </html>

Legend:
Removed from v.3226  
changed lines
  Added in v.3227

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26