[GRASS-user] FW: How to allow a file browser dialog in shell scripts

I'm trying to create a script to load plan ascii files as input. I'm
unfamiliar with all of the possible variations for the gisprompt
parameter structure. I want to allow the user to browse the Mapset to
load each ascii file.

While we're on the topic, can anyone explain why there are usually
several gisprompt parameters allowed for in most Grass shell scripts?
What do all these mean?

Thanks,

~ Eric.

Eric wrote:

I'm trying to create a script to load plan ascii files as input. I'm
unfamiliar with all of the possible variations for the gisprompt
parameter structure. I want to allow the user to browse the Mapset to
load each ascii file.

add to the option definition:

#% gisprompt: old_file,file,input

e.g. m.proj.

While we're on the topic, can anyone explain why there are usually
several gisprompt parameters allowed for in most Grass shell scripts?
What do all these mean?

somewhere deep in the programmers' manual or lib/gis/parser.c ...

from memory:

old/new - whether to open map/file browser; checks that it won't overwrite
element - the directory in $MAPSET, if applicable
prompt - mostly unused nowadays?

Hamish

Hamish wrote on 06/22/2006 11:35 AM:

Eric wrote:

I'm trying to create a script to load plan ascii files as input. I'm
unfamiliar with all of the possible variations for the gisprompt
parameter structure. I want to allow the user to browse the Mapset to
load each ascii file.
   
add to the option definition:

#% gisprompt: old_file,file,input

e.g. m.proj.

While we're on the topic, can anyone explain why there are usually
several gisprompt parameters allowed for in most Grass shell scripts?
What do all these mean?
   
somewhere deep in the programmers' manual or lib/gis/parser.c ...

from memory:

old/new - whether to open map/file browser; checks that it won't overwrite
element - the directory in $MAPSET, if applicable
prompt - mostly unused nowadays?

Here is the list:
http://mpa.itc.it/markus/grass61progman/
-> File List <http://mpa.itc.it/markus/grass61progman/files.html&gt;
   -> paerser.c
       http://mpa.itc.it/markus/grass61progman/parser_8c-source.html#l00326

Markus

Markus