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

Home » Public Forums » archive » Re: Passing Batch File Names
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Passing Batch File Names [message #62294 is a reply to message #62293] Tue, 02 September 2008 09:03 Go to previous messageGo to previous message
Trae is currently offline  Trae
Messages: 23
Registered: May 2007
Junior Member
Good suggestion. I just tried it too and was about to post my null
result.

I think the person that started writing this code is making life more
difficult than it has to be. The best way to go about this, I think,
is to write a procedure that reads the input file and returns an
undefined structure. You can then check for tags on the structure,
which gives you the necessary flexibility.

One of the problems is that the original input file must be human
readable text. So no .sav files.

Still, if anyone has a way to dynamically call a batch file with a
name that is passed as a variable, I would love to hear about it.

Cheers,
-Trae

On Sep 2, 11:54 am, "mgal...@gmail.com" <mgal...@gmail.com> wrote:
> On Sep 2, 9:41 am, Trae <traewin...@gmail.com> wrote:
>
>
>
>> Hey everyone,
>
>> I have a code that calls a batch file to assign variables that I want
>> the main level program to have. The names of the variables and the
>> number may change randomly, and not by me, so I didn't want to use a
>> procedure where I would have to change it every time an alteration was
>> made in the save file.
>
>> Now, I need to execute a batch file whose name is passed by another
>> program. I've used call_method, call_procedure, and call_function,
>> but I see nothing like call_batch.
>
>> My current fix is the following:
>
>> spawn, 'cp ' + in_name+' temp_name.pro'
>
>> @temp_name.pro
>
>> This doesn't seem very clean, but it makes all of the variables
>> available to the main level.
>
>> Any brighter ideas?
>
> I thought EXECUTE would be the answer, but it appears that it can't
> call a batch file:
>
> IDL> @test
> 5
> IDL> print, execute('@test')
>
> @test
> ^
> % Illegal character in program text.
> 0
>
> Mike
> --www.michaelgalloy.com
> Tech-X Corporation
> Software Developer II
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Singular Value Decomposition in 3 Dimensions
Next Topic: FFT and ROTATE

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

Current Time: Thu Oct 09 19:57:54 PDT 2025

Total time taken to generate the page: 0.96057 seconds