procedure watchdir
Watch a directory and trigger an action when a new file matching given pattern is created (only available on QFitsView). The remove the watch, call the procedure with empty arguments
Syntax
watchdir directory, pattern, action
Arguments
directory: | A string specifying the directory to watch |
pattern: | A string, the file pattern to be matched |
action: | A string, the dpuser script to be executed. The file name is marked as $$ |
Examples
To trigger reading the first extension of a FITS file when created in /tmp:
watchdir "/tmp", "*.fits", "hhh=readfitsextension($$, 1)" Stop watching:
watchdir "", "", ""