Open-Source-Software-Entwicklung und Downloads

Browse Subversion Repository

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1034 - (hide annotations) (download) (as text)
Tue Oct 21 00:30:15 2008 UTC (15 years, 7 months ago) by maya
Original Path: doc/trunk/en/html/macro/command/waitregex.html
File MIME type: text/html
File size: 2113 byte(s)
macro-example の中にある code を削除した。

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

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