The following script automatically opens a XSection window when a seismic file is added to the C:\Data directory, no user interaction required.
It uses several advanced concepts:
When this script is launched:
In this thread, we wait until the watch service has found a new file.
When a new file is found, we wait until it is fully written to disk.
Then we open it in a XSection window in the Swing thread (a.k.a the event dispatch thread)
You can download this script at the bottom of this page. To execute this script, just drag and drop it into the Python terminal.
In a real world implementation, you might want to: