Getting the editor info (visible window, selection start and end, etc.) in a Praat script is easy.
But say you want to do this continuously to log the state of your editor window into a text file while you're interacting with it.
The problem is that Praat doesn't seem to have a sleep or timeout command to pause execution of the script for a given amount of time, then continue without user interaction.
One hypothetical solution might be a Praat script that runs a system command such as sleep (or timeout on Windows), but the Praat UI blocks while the script is running, which is a dealbreaker.
Another solution is to poll from an external thread such as a shell script that can sleep or timeout natively.
This approach requires sending the corresponding commands to a running graphical Praat, which can be done using the sendpraat program.