.TH d.ask 1grass "" "GRASS 6.4.4" "Grass User's Manual" .SH NAME \fI\fBd.ask\fR\fR - Prompts the user to select a GRASS data base file from among files displayed in a menu on the graphics monitor. .SH KEYWORDS display, map management .SH SYNOPSIS \fBd.ask\fR .br \fBd.ask help\fR .br \fBd.ask element\fR=\fIname,description\fR [\fBprompt\fR=\fImessage\fR] [\-\-\fBverbose\fR] [\-\-\fBquiet\fR] .SS Parameters: .IP "\fBelement\fR=\fIname,description\fR" 4m .br Database element, one word description .IP "\fBprompt\fR=\fImessage\fR" 4m .br Short user prompt message .PP .SH DESCRIPTION \fId.ask\fR is designed for shell scripts that need to prompt the user for the name of a data base file in the user's current GRASS mapset search path. After \fId.ask\fR is invoked with needed parameters, the mouse becomes active and a menu containing files of the specified \fIelement\fR type is displayed on the user's graphics monitor. The user is prompted by the prompt "\fImessage\fR" to select one of the listed file names with the mouse. Specifically, the query that appears to the user takes the form: .PP .br \fBDouble\fR click on the \fIprompt\fR "message" .br \fBDouble\fR click here to cancel .PP .br (A list of files of the specified \fIelement\fR type from each of the mapsets listed in the user's mapset search path is also displayed.) .PP .PP After the user responds, the mouse is deactivated and the displayed menu is erased from the screen (leaving any underlying materials on display intact). Three lines are written to standard output (the user's terminal screen): .PP .br \fBname=\fR\fIfile_name\fR .br \fBmapset=\fR\fImapset_name\fR .br \fBfullname=\fR\fIfile_name@mapset_name\fR .PP .PP .SS Parameters: .IP "\fBelement=\fR\fIname,description\fR .br Name of a GRASS data base element, followed by a one word description of the element. GRASS data base elements are mapset subdirectories; these include: bdlg, cats, cell, cell_misc, cellhd, colr, colr2, dig, dig_ascii, dig_att, dig_cats, dig_plus, dlg, group, hist, icons, noise, paint, site_lists, and windows. The \fIdescription\fR will be used to display an error message to the screen if no files of the named element type exist in the user's mapset search path. The prompt "\fImessage\fR" will appear in the pop-up menu displayed on the user's graphics monitor. The files listed in the menu will be of the specified \fIelement\fR type, and exist in mapsets listed in the user's current mapset search path. .IP "\fBprompt=\fR"\fImessage\fR" .br A brief message with which the user will be prompted. If this message contains more than one word, it should be enclosed within double quotes (""). It is a non-selectable message displayed in the menu bar of a pop-up menu. Selectable items in the displayed menu include a cancel option and any of the files in the mapset subdirectory \fIname\fR in the user's mapset search path. .PP .SH EXAMPLE Given the following input, .PP \fBd.ask element=\fRcell,raster \fBprompt=\fR"raster map layer to be used" .PP .PP \fId.ask\fR will prompt the user to select a raster (cell) file from among those listed in the "cell" directories of the mapsets listed in his current mapset search path. A pop-up menu will be displayed on the user's graphics monitor, containing the prompt: .PP .br \fBDouble\fR click on the \fIraster\fR map layer to be used .br \fBDouble\fR click here to cancel .PP .SH OUTPUT If the user selects a file name from the displayed menu, \fId.ask\fR writes three lines to standard output: .PP .br \fBname=\fR\fIfile_name\fR .br \fBmapset=\fR\fImapset_name\fR .br \fBfullname=\fR\fIfile_name@mapset_name\fR .PP .PP The output is in the form of /bin/sh commands to set the variable \fIname\fR to the file name specified by the user (of the \fIelement\fR type requested by \fId.ask\fR), \fImapset\fR to the GRASS mapset in which this file resides, and \fIfullname\fR to the name of the file and its mapset. .PP If the user elects not to select a file but instead chooses the \(dqDouble click here to cancel" option, the mouse will be deactivated and no variable assignments will be returned to standard output. .PP If no files of the specified \fIelement\fR type are found in the user's current mapset search path, the mouse is activated and the following message is displayed on the user's graphics monitor: .PP .br \fBNo \fIelement\fR description files found\fR .br \fBClick here to continue\fR .PP .PP .SH NOTES Parameter values (the \fIelement\fR name and description, and \fIprompt\fR message) cannot be supplied to \fId.ask\fR interactively; they must be supplied on the command line or from a file. .SH SEE ALSO \fI d.menu, .br g.ask, .br g.filename, .br g.findfile, .br g.gisenv, .br g.mapsets \fR .SH BUGS This program calls other GRASS programs which may generate confusing error messages. Example: an error message from the program d.menu will appear if a nonexistent map element is chosen. .SH AUTHOR Michael Shapiro, U.S. Army Construction Engineering Research Laboratory .PP \fILast changed: $Date: 2011-11-08 12:29:50 +0100 (Tue, 08 Nov 2011) $\fR .PP Full index .PP © 2003-2014 GRASS Development Team