Re: passing parameters to .sav file in IDL VM [message #68071 is a reply to message #68070] |
Mon, 21 September 2009 01:55   |
Prashanth
Messages: 9 Registered: June 2009
|
Junior Member |
|
|
Hello David,
The first part of the code goes like this
Pro ChangeView, file1,file2,file3
argsarray=command_line_args(count=nparams)
if nparams eq 3 then begin
file1=argsarray[0]
file2=argsarray[1]
file3=argsarray[2]
endif
if (nparams lt 3) then begin
file1 = DIALOG_PICKFILE(title='Select the first image')
file2 = DIALOG_PICKFILE(title='Select the second image')
file3 = DIALOG_PICKFILE(title='Select the change image')
endif
img1= read_envi_img(file1,lines=lines, samples=samples, bands=bands)
.
.
.
and I try to execute it using
idl -vm=changeview.sav -args "c:\june" "c:\october" "c:\june_oct"
This one opens the dialog window which means it is not recognizing the
input arguments. Is there something wrong with my procedure definition
"Pro changeview, file1,file2,file3" ?
Thank you
Prashanth
> An alternative explanation is that the variables
> are not set before you get to that part of the code.
> That seems entirely more likely to me. :-)
>
> The question really is, what are you *doing* with
> those parameters once you pick them up with
> Command_Line_Args? I'd guess, not putting them into
> your variables.
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|