1d.ask(1) Grass User's Manual d.ask(1)
2
3
4
6 d.ask - Prompts the user to select a GRASS data base file from among
7 files displayed in a menu on the graphics monitor.
8
10 display
11
13 d.ask
14 d.ask help
15 d.ask element=name,description [prompt="message"]
16
17 Parameters:
18 element=name,description
19 Database element , one word description
20
21 prompt=
22 Short user prompt message
23
25 d.ask is designed for shell scripts that need to prompt the user for
26 the name of a data base file in the user's current GRASS mapset search
27 path. After d.ask is invoked with needed parameters, the mouse becomes
28 active and a menu containing files of the specified element type is
29 displayed on the user's graphics monitor. The user is prompted by the
30 prompt "message" to select one of the listed file names with the mouse.
31 Specifically, the query that appears to the user takes the form:
32
33 Double click on the prompt "message" Double click here to cancel
34
35 (A list of files of the specified element type from each of the mapsets
36 listed in the user's mapset search path is also displayed.)
37
38 After the user responds, the mouse is deactivated and the displayed
39 menu is erased from the screen (leaving any underlying materials on
40 display intact). Three lines are written to standard output (the
41 user's terminal screen):
42
43 name=file_name mapset=mapset_name fullname=file_name@mapset_name
44
45 Parameters:
46 element=name,description
47 Name of a GRASS data base element, followed by a one word
48 description of the element. GRASS data base elements are mapset
49 subdirectories; these include: bdlg, cats, cell, cell_misc,
50 cellhd, colr, colr2, dig, dig_ascii, dig_att, dig_cats,
51 dig_plus, dlg, group, hist, icons, noise, paint, site_lists, and
52 windows. The description will be used to display an error mes‐
53 sage to the screen if no files of the named element type exist
54 in the user's mapset search path. The prompt "message" will
55 appear in the pop-up menu displayed on the user's graphics moni‐
56 tor. The files listed in the menu will be of the specified ele‐
57 ment type, and exist in mapsets listed in the user's current
58 mapset search path.
59
60 prompt=
61 A brief message with which the user will be prompted. If this
62 message contains more than one word, it should be enclosed
63 within double quotes (""). It is a non-selectable message dis‐
64 played in the menu bar of a pop-up menu. Selectable items in
65 the displayed menu include a cancel option and any of the files
66 in the mapset subdirectory name in the user's mapset search
67 path.
68
70 Given the following input,
71
72 d.ask element=cell,raster prompt="raster map layer to be used"
73
74 d.ask will prompt the user to select a raster (cell) file from among
75 those listed in the "cell" directories of the mapsets listed in his
76 current mapset search path. A pop-up menu will be displayed on the
77 user's graphics monitor, containing the prompt:
78
79 Double click on the raster map layer to be used Double click here to
80 cancel
81
83 If the user selects a file name from the displayed menu, d.ask writes
84 three lines to standard output:
85
86 name=file_name mapset=mapset_name fullname=file_name@mapset_name
87
88 The output is in the form of /bin/sh commands to set the variable name
89 to the file name specified by the user (of the element type requested
90 by d.ask), mapset to the GRASS mapset in which this file resides, and
91 fullname to the name of the file and its mapset.
92
93 If the user elects not to select a file but instead chooses the "Double
94 click here to cancel" option, the mouse will be deactivated and no
95 variable assignments will be returned to standard output.
96
97 If no files of the specified element type are found in the user's cur‐
98 rent mapset search path, the mouse is activated and the following mes‐
99 sage is displayed on the user's graphics monitor:
100
101 No element description files found Click here to continue
102
104 Parameter values (the element name and description, and prompt message)
105 cannot be supplied to d.ask interactively; they must be supplied on the
106 command line or from a file.
107
109 g.ask,
110 g.filename,
111 g.findfile,
112 g.gisenv,
113 g.mapsets
114
116 This program calls other GRASS programs which may generate confusing
117 error messages. Example: an error message from the program d.menu will
118 appear if a nonexistent map element is chosen.
119
121 Michael Shapiro, U.S. Army Construction Engineering Research Laboratory
122
123 Last changed: $Date: 2005/11/04 16:39:21 $
124
125 Full index
126
127
128
129GRASS 6.2.2 d.ask(1)