I created a button that can run a Fortran code using the run -e command. The code Opens a dos box and runs. The output of the code( a file) is loaded to a worksheet. The problem is a need some way knowing that the Fortran code finished and only then run the open command to load the file. Any ideas??
The method mentioned by Mike is not flawless: If the fortran code runs for a long time and continuously writes into the output file, then the import occurs when the file is created and not when it is closed. Therefore, the imported dataset contains only the first few lines of the output. One possible solution is to create a "flag file" (e.g. finished.txt) from the fortran code before it exits, and checking the existance of this "flag file" from the LabTalk script.