Home »
Public Forums »
archive »
Re: idlrt - passing arguments
Re: idlrt - passing arguments [message #12997] |
Mon, 28 September 1998 00:00 |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
R. Bauer (r.bauer@fz-juelich.de) writes:
> is it posibble to pass an argument to the runtime code like a filename?
> At the momemt I am going through a tmp file, that's not fine but it works.
There are many ways to pass a filename argument to run-time
or batch code. I have a whole file of them that I have collected
from this newsgroup. I plan to organize them and put up on my
web page some day, although it is certainly NOT going to be
today. :-)
I think the simplest and easiest to use is to use ENVIRONMENT
VARIABLES. I just tried this on my Windows NT machine and
it works like a charm.
1. I went into my System Control Panel and selected the
Environment tab. I created a new environment variable
named IDL_Filename to point to the name of an image data file
I want to open in my program
2. Inside my run-time program I get the filename like this:
filename = GetEnv('IDL_Filename')
3. I run my run-time program. Done. Opens the correct file.
To make the program run with another filename, I just
make the change in my System Control Panel (be sure to
hit both the SET and APPLY buttons!), then run my program
again. Opens the new file. Very slick.
Cheers,
David
----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438, Toll-Free Book Orders: 1-888-461-0155
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|
Current Time: Wed Oct 08 13:39:44 PDT 2025
Total time taken to generate the page: 0.00639 seconds