timing after spawn

Strictly for sharing scripts used in Digital Atmosphere and getting assistance from other users.
Post Reply
guerosanto
Junior Member
Posts: 4
Joined: Mon Mar 06, 2006 10:57 pm
Location: San Juan
Contact:

timing after spawn

Post by guerosanto »

I built a noaaport system and wrote all the software to receive and process the data
(http://www.noaaport.net). My favorite program to display the data is becoming DA,
except that it lacks the ability to process and display satellite data (GINI files).

I have suggested to David Taylor (of SatSignal and friends) to write a simple program
that could be integrated with DA via the spawn command to add that missing link.
He came up with what appears to be a simple yet effective program for that, and last
night he sent me an evaluation copy that I have been testing.
The program will be available from him.

However I am having a slight problem and I wanted to see if someone could have
an answer to the following. The program is called "giniviewer" and takes as argument
the name of the data file (call it datafile), and produces an image file on disk (call it image.bmp).

Then I use like this

spawn,giniviewer,datafile,0
import,image.bmp

The problem is that giniviewer takes a few seconds to process the data, and then
the script generates an error because it seems that the import instruction is executed
immediately after the spawn command but before the image has been generated.
The "solution" is to insert a sleep interval, like

spawn,giniviewer,datafile,0
sleep,10
import,image.bmp

The question is whether there is any way to specify that the spawn command should
wait until the spawned process finishes, before it goes to the next instruction, or
is this kind of trick the only option.

Thanks for any advice.

Jose F Nieves
Post Reply