Hello,
On the long run, I would like to perform some repeating tasks on a huge number of images. The main analysis is done with Python, but some parts can only be performed in ENVI. Therefore, I would like to create a function in IDL, which can be called from Python.
I'm still at the very beginning. Right now, I would like to accomplish the following:
Create a procedure/function in IDL, that:
can be called from a Windows command line
accepts an input argument
I thought this should be rather simple, but it doesn't seem so.
Here are some things I've tried so far:
1. In Windows command line:
idl -e 'print, "123test"'
Output:
IDL Version 8.0.1 Microsoft Windows [...]
Installation number: xxxxxx
Licensed for use by: xxxxxx
However, it doesn't print "123test".
2. Typing the following command:
idl -e "t=DIALOG_MESSAGE('123test')"
works as expected (a dialog box with "123test" opens).
3. I created a file called "test.pro" with this content:
print, "123test"
t=DIALOG_MESSAGE('123test')
exit
I start IDL by typing "idl" from the windows command prompt. Then, in the IDL command line, I type
@test
"123test" is then printed to the IDL command line, the '123test'-Dialog box opens, and then it exits to the Windows command line.
4. I tried to call the file from the Windows command line using:
idl -e ".run 123test"
idl -e ".run 123test.pro"
idl -e '.run 123test'
idl -e '.run 123test.pro'
idl -e '@123test'
However, each time, the only output is:
IDL Version 8.0.1 Microsoft Windows [...]
Installation number: xxxxxx
Licensed for use by: xxxxxx
Nothing else.
I actually tried a lot of other things as well, but nothing worked. So, the question is:
How can a IDL batch file be executed from the Windows command line?
|