A Windows console or Unix (MacOS, Linux) terminal program for sending messages to a running Praat program.
sendpraat [timeOut] program message...
For the meaning of the arguments, see the sendpraat subroutine.
sendpraat 0 praat Quit
Causes the program Praat to quit (gracefully), because Quit is a fixed command in one of its menus. On Unix, sendpraat returns immediately; on Windows, you leave out the timeOut argument.
sendpraat 1000 praat "Read from file... hello.wav" "Play reverse" "Remove"
This works because Play reverse is an action command that becomes available in the dynamic menu of the Praat program when a Sound is selected. On Unix, sendpraat will allow Praat at most 1000 seconds to perform this.
Each line is a separate argument. Lines that contain spaces should be put inside double quotes.
sendpraat als "for i from 1 to 5" "Draw circle: 0.5, 0.5, i" "endfor"
This causes the program Als to draw five concentric circles into the Picture window.
sendpraat praat "runScript: \"doAll.praat\", 20"
This causes the program Praat to execute the script doAll.praat with an argument of "20".
© ppgb, October 20, 2015