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=Shift_JIS"> |
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS"> |
6 |
<title>logpause</title> |
<title>logpause</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>logpause</h1> |
<h1>logpause</h1> |
15 |
|
|
16 |
<p> |
<p> |
17 |
Tera Term のログを一時中断する。 |
Tera Term のログを一時中断する。 |
18 |
</p> |
</p> |
19 |
|
|
20 |
<pre class="macro-syntax"> |
<pre class="macro-syntax"> |
21 |
logpause |
logpause |
22 |
</pre> |
</pre> |
23 |
|
|
24 |
<h2>解説</h2> |
<h2>解説</h2> |
25 |
|
|
26 |
<p> |
<p> |
27 |
中断している間に受信された文字はログファイルに書き込まれない。 |
中断している間に受信された文字はログファイルに書き込まれない。 |
28 |
</p> |
</p> |
29 |
|
|
30 |
<h2>例</h2> |
<h2>例</h2> |
31 |
|
|
32 |
<pre class="macro-example"> |
<pre class="macro-example"> |
33 |
prompt = '$' |
prompt = '$' |
34 |
|
|
35 |
cygconnect |
cygconnect |
36 |
wait prompt |
wait prompt |
37 |
|
|
38 |
; ユーザ名を取得 |
; ユーザ名を取得 |
39 |
getenv 'USERNAME' username |
getenv 'USERNAME' username |
40 |
; 日時を取得 |
; 日時を取得 |
41 |
gettime timestr "%Y%m%d-%H%M%S" |
gettime timestr "%Y%m%d-%H%M%S" |
42 |
|
|
43 |
; ログファイル名に日時とユーザ名を入れる。 |
; ログファイル名に日時とユーザ名を入れる。 |
44 |
sprintf2 filename 'd:\console_%s_%s.log' username timestr |
sprintf2 filename 'd:\console_%s_%s.log' username timestr |
45 |
;messagebox filename 'filename' |
;messagebox filename 'filename' |
46 |
|
|
47 |
logopen filename 0 0 |
logopen filename 0 0 |
48 |
logwrite 'Log start'#13#10 |
logwrite 'Log start'#13#10 |
49 |
sendln 'cal' |
sendln 'cal' |
50 |
wait prompt |
wait prompt |
51 |
; ログ停止 |
; ログ停止 |
52 |
logpause |
logpause |
53 |
; 以下のコマンドはログ採取されない |
; 以下のコマンドはログ採取されない |
54 |
sendln 'date' |
sendln 'date' |
55 |
wait prompt |
wait prompt |
56 |
; ログ再開 |
; ログ再開 |
57 |
logstart |
logstart |
58 |
sendln 'uptime' |
sendln 'uptime' |
59 |
wait prompt |
wait prompt |
60 |
logwrite '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@'#13#10 |
logwrite '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@'#13#10 |
61 |
logclose |
logclose |
62 |
|
|
63 |
exit |
exit |
64 |
</pre> |
</pre> |
65 |
|
|
66 |
</body> |
</body> |
67 |
</html> |
</html> |