Open-Source-Software-Entwicklung und Downloads

Browse Subversion Repository

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1171 - (hide annotations) (download) (as text)
Sun Mar 22 05:35:41 2009 UTC (15 years, 2 months ago) by yutakapon
Original Path: doc/trunk/en/html/macro/command/logopen.html
File MIME type: text/html
File size: 2303 byte(s)
*** empty log message ***

1 maya 332 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
2     "http://www.w3.org/TR/html4/strict.dtd">
3 maya 571 <html>
4     <head>
5     <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
6     <title>logopen</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 206
11 maya 571 <body>
12 yutakakn 206
13    
14 maya 571 <h1>logopen</h1>
15 yutakakn 206
16 maya 571 <p>
17     Causes Tera Term to start logging.
18     </p>
19 yutakakn 206
20 maya 571 <pre class="macro-syntax">
21 maya 774 logopen &lt;filename&gt; &lt;binary flag&gt; &lt;append flag&gt; [&lt;plain text flag&gt; [&lt;timestamp flag&gt; [&lt;hide dialog flag&gt;]]]
22 yutakakn 206 </pre>
23    
24 maya 571 <h2>Remarks</h2>
25 yutakakn 206
26 maya 571 <p>
27 yutakapon 1007 Received characters are written to the file &lt;filename&gt;.<br>
28 yutakapon 1013 When the file does not include \ character, the file is saved at the TeraTerm current directory. If a user want to change the directory, use the <a href="changedir.html">changedir</a> macro command.
29 maya 571 </p>
30    
31     <p>
32     If &lt;binary flag&gt; is zero, received new-line characters are converted (CR -&gt; CR/CRLF) and escape sequences are stripped out.<br>
33     If &lt;binary flag&gt; is non-zero, received characters are written without any modifications.
34     </p>
35    
36     <p>
37 maya 774 If &lt;append flag&gt; is non-zero and the file &lt;filename&gt; already exists, received characters are appended to it.<br>
38     If &lt;append flag&gt; is zero and the file &lt;filename&gt; already exists, the file is overwritten.
39     </p>
40 maya 571
41 maya 778 <p>
42 maya 1106 If &lt;plain text flag&gt; is not 0, ASCII non-printable characters are not written into log.<br>
43     If &lt;timestamp flag&gt; is not 0, a timestamp is added on top of log.<br>
44     If &lt;hide dialog flag&gt; is not 0, "Log" dialog box is not displayed.
45 maya 774 </p>
46    
47 maya 1170 <p>
48 yutakapon 1171 If a log file is successfully opened, the system variable "result" is set to 0. Otherwise, the "result" is set to 1. <em>(version 4.62 or later)</em>
49 maya 1170 </p>
50 maya 571
51     <h2>Example</h2>
52    
53     <pre class="macro-example">
54 yutakapon 1007 connect '/C=1'
55    
56     ; get a user name
57     getenv 'USERNAME' username
58     ; get the date and time
59     gettime timestr "%Y%m%d-%H%M%S"
60    
61     ; add the user name and the timestamp to the log file name
62 yutakapon 1087 sprintf2 filename 'console_%s_%s.log' username timestr
63 yutakapon 1007
64 yutakapon 1013 ; change the current directory
65     changedir 'C:\Documents and Settings\yutaka\desktop'
66    
67 yutakapon 1007 logopen filename 0 0
68     logwrite 'Log start'#13#10
69     logwrite '*****************************************************'#13#10
70     logclose
71    
72     exit
73 maya 1034 </pre>
74 maya 571
75     </body>
76     </html>

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