Re: Input parameters in a DOS menu driven routine. [message #34319] |
Thu, 06 March 2003 10:30 |
R.Bauer
Messages: 1424 Registered: November 1998
|
Senior Member |
|
|
If you have the algorithm it could be easier to reprogramm it in idl.
This is the way I would proceed
Reimar
Luciano wrote:
> Hi,
>
> I have a fortran exe file which I run, then I have to input some
> parameters and finally I obtain a result (this all happens of course
> in a DOS window). Something like:
> C:\>program.exe
> C:\>input temperature:
> C:\>input density:
> and so on
> c:\>The result is: 5
>
> Now, how can I do this from IDL? I can call the file with Spawn but
> then how do I input the parameters? I was trying to Spawn a batch file
> wich runs some programs I found on the web which simulate pre-defined
> keystrokes, but all of them have the problem that no more than 15
> keystrokes could be passed (I need more than 15)...
>
> Of course there is also the question on how do I take the final result
> of the fortran routine back to IDL...
>
>
> Any ideas?
>
>
> thanks.
>
> Luciano.
--
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
http://www.fz-juelich.de/icg/icg-i/
============================================================ ======
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_lib_intro. html
|
|
|
Re: Input parameters in a DOS menu driven routine. [message #34329 is a reply to message #34319] |
Wed, 05 March 2003 22:45  |
Rick Towler
Messages: 821 Registered: August 1998
|
Senior Member |
|
|
"Luciano" wrote
> I have a fortran exe file which I run, then I have to input some
> parameters and finally I obtain a result (this all happens of course
> in a DOS window).
> Now, how can I do this from IDL? I can call the file with Spawn but
> then how do I input the parameters? I was trying to Spawn a batch file
> wich runs some programs I found on the web which simulate pre-defined
> keystrokes, but all of them have the problem that no more than 15
> keystrokes could be passed (I need more than 15)...
Do you have access to the source? I think it will be easiest to modify the
source to either accept command line parameters or read the params from a
file. My guess is that if you have gone this far you don't but I had to
ask.
If you don't... Hope that you can find one of these programs that allows
more than 15 keystrokes. I am pretty sur this is your only option.
> Of course there is also the question on how do I take the final result
> of the fortran routine back to IDL...
If you can use spawn, spawn can return the result:
IDL> spawn, 'echo hello there', out
IDL> print,out
hello there
-Rick
|
|
|