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>setexitcode</title> |
7 |
|
|
<meta http-equiv="Content-Style-Type" content="text/css"> |
8 |
|
|
<link rel="stylesheet" href="../../style.css" type="text/css"> |
9 |
|
|
</head> |
10 |
yutakapon |
222 |
|
11 |
maya |
571 |
<body> |
12 |
yutakapon |
222 |
|
13 |
maya |
571 |
|
14 |
|
|
<h1>setexitcode</h1> |
15 |
|
|
|
16 |
|
|
<p> |
17 |
|
|
Sets the exit code of MACRO. |
18 |
|
|
</p> |
19 |
|
|
|
20 |
|
|
<pre class="macro-syntax"> |
21 |
yutakapon |
222 |
setexitcode <exit code> |
22 |
maya |
571 |
</pre> |
23 |
yutakapon |
222 |
|
24 |
maya |
571 |
<h2>Remarks</h2> |
25 |
yutakapon |
222 |
|
26 |
maya |
571 |
<h3>For Windows 98</h3> |
27 |
yutakapon |
222 |
|
28 |
maya |
571 |
<p> |
29 |
|
|
If MACRO is run from a batch file by the command line "start /w ttpmacro <ttl filename>" (the option /w is necessary), the exit code can be tested by the DOS command "if errorlevel n". |
30 |
|
|
</p> |
31 |
yutakapon |
222 |
|
32 |
maya |
571 |
<h3>For Windows NT4.0/2000/XP</h3> |
33 |
yutakapon |
222 |
|
34 |
maya |
571 |
<p> |
35 |
|
|
If MACRO is run from a batch file by the command line "ttpmacro <ttl filename>", the exit code can be tested by the DOS command "if errorlevel n". |
36 |
|
|
</p> |
37 |
yutakapon |
222 |
|
38 |
maya |
571 |
<h2>Example</h2> |
39 |
yutakapon |
222 |
|
40 |
maya |
571 |
<pre class="macro-example"> |
41 |
|
|
<code>----- バッチファイル "test.bat" (Win 98/Me の場合) ------ |
42 |
|
|
rem Run MACRO using the "start /w" command. |
43 |
|
|
start /w ttpmacro test.ttl |
44 |
|
|
rem Display message if the exit code is greater than 0. |
45 |
|
|
if errorlevel 1 echo Error! |
46 |
|
|
----- "test.bat" の終わり --------- |
47 |
yutakapon |
222 |
|
48 |
maya |
571 |
----- バッチファイル "test.bat" (Win NT/2000/XP の場合) ------ |
49 |
|
|
rem Run MACRO. No need to use the "start" command. |
50 |
|
|
ttpmacro test.ttl |
51 |
|
|
rem Display message if the exit code is greater than 0. |
52 |
|
|
if errorlevel 1 echo Error! |
53 |
|
|
----- "test.bat" の終わり --------- |
54 |
yutakapon |
222 |
|
55 |
maya |
571 |
----- マクロファイル "test.ttl" ---- |
56 |
|
|
; Set the exit code to 1. |
57 |
|
|
setexitcode 1 |
58 |
|
|
----- "test.ttl" の終わり ---------- |
59 |
|
|
</code></pre> |
60 |
|
|
|
61 |
|
|
</body> |
62 |
|
|
</html> |