Open-Source-Software-Entwicklung und Downloads

Browse Subversion Repository

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 571 - (hide annotations) (download) (as text)
Fri Sep 21 02:02:56 2007 UTC (16 years, 8 months ago) by maya
Original Path: doc/trunk/en/html/macro/command/setexitcode.html
File MIME type: text/html
File size: 1623 byte(s)
no 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>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 &lt;exit code&gt;
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 &lt;ttl filename&gt;" (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 &lt;ttl filename&gt;", 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>

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