comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: launching executables from idl
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: launching executables from idl [message #30002] Thu, 28 March 2002 16:51
jvp10 is currently offline  jvp10
Messages: 4
Registered: February 2002
Junior Member
Thanks all, that's exactly what I was looking for.

Jon Pearce.
Re: launching executables from idl [message #30005 is a reply to message #30002] Wed, 27 March 2002 23:40 Go to previous message
G Karas is currently offline  G Karas
Messages: 12
Registered: March 2002
Junior Member
or... write off a script from within IDL
save it in a file and use SPAWN with the script name:

eg

file is commands.txt

CMD = 'dothiscommand < commands.txt' ; should work in DOS as well
SPAWN, CMD

or,

CD, dir ; where dir is where your script is
filename = 'commands.script'
CMD = 'chmod 755' + filname ; for unix
SPAWN, CMD
CMD = 'command.script'
SPAWN, CMD, result
print, result ; to get you the results (txt) back in IDL

basically SPAWN is just a way to escape into the
command line from within an IDL session
What I do, is send off all the commands to a script,
then make that executable and SPAWN it. Not very
elegant, very system-dependant, but it is quick and dirty.

cheers!
Re: launching executables from idl [message #30008 is a reply to message #30005] Wed, 27 March 2002 17:32 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Jonathan Pearce (jvp10@psu.edu) writes:

> Is it possible to launch executables (*.exe) from IDL? I would like to
> use IDL to write a front end program which would call various
> executables. These executables also need to have command line options
> passed to them.
>
> Can it be done? In the documentation I can only see references to
> calling dlls.
>
> I'd be most grateful for any responses,

Use SPAWN. The command string you send to the OS can have
all kinds of command line arguments, you just won't
be able to pass any IDL variables to your routines.

Cheers,

David
--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Computer freezes when IDL 5.5 tries to display an image larger than the given window
Next Topic: Re: how to pass a parameter to a .sav routine??

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:52:39 PDT 2025

Total time taken to generate the page: 0.00498 seconds