|
A function that can be used in Scripting.
runSubprocess (executableFilePath$, ...)
executableFilePath$, with optional arguments given in “...”.If the subprocess fails in its execution, runSubprocess will report the subprocess’ error message and stop the script.
writeInfoLine: “start”
runSubprocess: “C:\\Windows\Notepad.exe”
appendInfoLine: “end”
This script will write “start” into the Info window, then start up Notepad.exe, wait until you close Notepad, and only then write “end” into the Info window. That is, the subprocess is run synchronously.
You can use asynchronous in combination with runSubprocess:
writeInfoLine: “start”
asynchronous runSubprocess: “C:\\Windows\Notepad.exe”
appendInfoLine: “end”
This script will write “start” into the Info window, then start up Notepad.exe, and then immediately write “end” into the Info window. Whatever you subsequently do in Notepad (including closing that app) will have no influence on your script or on Praat in general.
For some more details and examples, see Scripting 6.5. Calling system commands.
© Paul Boersma 2023,2026