Question about GRADs

Fabiana faizpun at ADINET.COM.UY
Wed May 23 16:37:16 EDT 2007


Alessandro
excelent thanks a lot, i try with the code in a bat file:

C:
cd "C:\Archivos de programa\PCGrADS\win32e"
Grads -lc prueba.gs

in VBasic:
b = ShellExecute(Me.hwnd, "Open", "C:\Archivos de programa\PCGrADS\win32e\Grads.exe", "-lc prueba", "C:\Archivos de programa\PCGrADS\win32e\", 2)

and its works!!!

I have a new question, the script Prueba.gs has a function who takes a parameter,
how i can rewrite the code, in my case i have a function who open a file and the name of the file is the parameter.
i try adding the parameter like this
Grads -lc prueba.gs 22
where 22.ctl is a file
but it doesnt work.

sorry about the gramatical errors but the english is not my language!

i paste the code of the script Prueba.gs

function prueba(args)
* Only argument is the name of the file to open
  if (args!='')
    openfile=subwrd(args,1)
  endif
* Add ".ctl" to the filename if it's not already there
  len  = math_strlen(openfile)
  if (len >= 4)
    tail = substr(openfile,len-3,4)
  else
    tail = openfile
  endif
  if (tail != '.ctl')
    openfile = openfile%'.ctl'
  endif
  'open 'openfile
  'set lat 97 211'
  'set lon 82 100'
  'set fwrite -le Fabiana.txt'
  'set gxout fwrite'
  'd prec'
  'disable fwrite'

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20070523/0f0f94e3/attachment.html 


More information about the gradsusr mailing list