Debian Codegraph @

docs/manual/_runSubprocess_.html

raw symbols SCIP
1 <html><head><meta name="robots" content="index,follow"><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
2 <title>runSubprocess</title>
3 <style>
4 td { padding-left: 5pt; padding-right: 5pt; }
5 th { padding-left: 5pt; padding-right: 5pt; }
6 code { white-space: pre-wrap; }
7 dd { white-space: pre-wrap; }
8 </style>
9 </head><body bgcolor="#FFFFFF">
10
11 <table border=0 cellpadding=0 cellspacing=0><tr><td bgcolor="#CCCC00"><table border=4 cellpadding=9><tr><td align=middle bgcolor="#000000"><font face="Monaco,Courier" size=6 color="#999900"><b>
12 runSubprocess
13 </b></font></table></table>
14 <p>A function that can be used in <a href="Scripting.html">Scripting</a>.</p>
15 <h2>Syntax and semantics</h2>
16 <dl>
17 <dt><b><code><font size=+1>runSubprocess</font></code></b> (<i><code><font size=+1>executableFilePath$</font></code></i>, <code><font size=+1>...</font></code>)
18 <dd>run the program given by the (relative or absolute) <i><code><font size=+1>executableFilePath$</font></code></i>, with optional arguments given in &#8220;<code><font size=+1>...</font></code>&#8221;.</dd>
19 </dl>
20 <p>If the subprocess fails in its execution, <b><code><font size=+1>runSubprocess</font></code></b> will report the subprocess&#8217; error message and stop the script.</p>
21 <h2>Examples</h2>
22 <code> <a href="_writeInfoLine_.html">writeInfoLine</a>: “start”<br></code>
23 <code> <b>runSubprocess</b>: “C:\\Windows\Notepad.exe”<br></code>
24 <code> <a href="_appendInfoLine_.html">appendInfoLine</a>: “end”<br></code>
25 <p>This script will write &#8220;start&#8221; into the Info window, then start up <code><font size=+1>Notepad.exe</font></code>, wait until you close <code><font size=+1>Notepad</font></code>, and only then write &#8220;end&#8221; into the Info window. That is, the subprocess is run <i>synchronously</i>.</p>
26 <p>You can use <a href="_asynchronous_.html"><b><code><font size=+1>asynchronous</font></code></b></a> in combination with <b><code><font size=+1>runSubprocess</font></code></b>:</p>
27 <code> <a href="_writeInfoLine_.html">writeInfoLine</a>: “start”<br></code>
28 <code> <b><a href="_asynchronous_.html">asynchronous</a></b> <b>runSubprocess</b>: “C:\\Windows\Notepad.exe”<br></code>
29 <code> <a href="_appendInfoLine_.html">appendInfoLine</a>: “end”<br></code>
30 <p>This script will write &#8220;start&#8221; into the Info window, then start up <code><font size=+1>Notepad.exe</font></code>, and then immediately write &#8220;end&#8221; into the Info window. Whatever you subsequently do in <code><font size=+1>Notepad</font></code> (including closing that app) will have no influence on your script or on Praat in general.</p>
31 <p>For some more details and examples, see <a href="Scripting_6_5__Calling_system_commands.html">Scripting 6.5. Calling system commands</a>.</p>
32 <h3>Links to this page</h3>
33 <ul>
34 <li><a href="Functions.html">Functions</a>
35 <li><a href="What_was_new_in_6_4_.html">What was new in 6.4?</a>
36 <li><a href="What_s_new_.html">What's new?</a>
37 </ul>
38 <hr>
39 <address>
40 <p>© Paul Boersma 2023,2026</p>
41 </address>
42 </body>
43 </html>