Home »
Public Forums »
archive »
Re: Problems using SPAWN in IDL for WINDOWS?
Re: Problems using SPAWN in IDL for WINDOWS? [message #4627] |
Thu, 29 June 1995 00:00 |
Mark Hadfield
Messages: 783 Registered: May 1995
|
Senior Member |
|
|
rdhunt@kodiak.ms.sandia.gov (Richard D. Hunt) wrote:
>
> I am having a problem using the SPAWN command in IDL 4.0 for WINDOWS.
> It seems that IDL will spawn the command but won't wait for it to finish
> before it continues. Does anyone know how to get around this? Is
> there anyone out there who has done any system interfacing with IDL
> code? The WINDOWS version seems to be really lacking in this area.
I concur fully with your last comment.
I don't know of any way to make SPAWN wait for the spawned command to finish.
Because the command is issued in a separate DOS box it would be necessary to throw
IDL into a loop and monitor the existence of the DOS box. IDL can't do this without
external programming.
Using Visual Basic, I have written an external program (I call it HELPER) that
extends IDL for Windows' capabilities. IDL communicates with HELPER using DDE and
can instruct it to start a program (DOS or Windows) or can send it a string to be
stored on the Windows Clipboard. I haven't currently set up IDL/HELPER so that it
waits for a spawned program to execute, but I could do this (it shouldn't be too
difficult) if anyone wanted it.
It would also be possible (and more elegant) to write an interface between IDL and
Windows API functions using C. I haven't done this because I don't have a Windows C
compiler.
Perhaps I should also mention that I have an IDL procedure (called YIELD) that
forces IDL to yield the CPU to other Windows programs and so allows co-operative
multi-tasking.
Please email me if you want more info.
--
============================================================ ==
Mark Hadfield hadfield@storm.greta.cri.nz
NIWA (Taihoro Nukurangi) NIWA.GRETA:HADFIELD
Wellington, New Zealand
|
|
|
Current Time: Wed Oct 08 17:41:32 PDT 2025
Total time taken to generate the page: 0.00744 seconds