d.ask(1)	       Grass User's Manual		 d.ask(1)



NNAAMMEE
       dd..aasskk  - Prompts the user to select a GRASS data base file
       from among files displayed in a menu on the graphics moni-
       tor.
       _(_G_R_A_S_S File Management Program)

SSYYNNOOPPSSIISS
       dd..aasskk hheellpp
       dd..aasskk eelleemmeenntt==_n_a_m_e_,_d_e_s_c_r_i_p_t_i_o_n [pprroommpptt=="_m_e_s_s_a_g_e"]

DDEESSCCRRIIPPTTIIOONN
       _d_._a_s_k  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 _d_._a_s_k is invoked
       with needed parameters, the mouse  becomes  active  and	a
       menu  containing  files	of  the specified _e_l_e_m_e_n_t type is
       displayed on the user's graphics  monitor.   The  user  is
       prompted  by  the  prompt  "_m_e_s_s_a_g_e"  to select one of the
       listed file names with the mouse. Specifically, the  query
       that appears to the user takes the form:


       DDoouubbllee  click on the _p_r_o_m_p_t "message" DDoouubbllee click here to
       cancel


       (A list of files of the specified _e_l_e_m_e_n_t type  from  each
       of  the mapsets listed in the user's mapset search path is
       also displayed.)



       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):


       nnaammee==_f_i_l_e___n_a_m_e		mmaappsseett==_m_a_p_s_e_t___n_a_m_e	    ffuullll--
       nnaammee==_f_i_l_e___n_a_m_e_@_m_a_p_s_e_t___n_a_m_e




   PPaarraammeetteerrss::
       eelleemmeenntt==_n_a_m_e_,_d_e_s_c_r_i_p_t_i_o_n
	      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 _d_e_s_c_r_i_p_t_i_o_n will be used to  dis-
	      play  an error message to the screen if no files of
	      the named element type exist in the  user's  mapset
	      search  path.   The prompt "_m_e_s_s_a_g_e" 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 _e_l_e_m_e_n_t type, and  exist  in  mapsets
	      listed in the user's current mapset search path.

       pprroommpptt==
	      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 _n_a_m_e in the
	      user's mapset search path.


EEXXAAMMPPLLEE
       Given the following input,


       dd..aasskk eelleemmeenntt==cell,raster pprroommpptt=="raster map layer  to  be
       used"



       _d_._a_s_k  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:


       DDoouubbllee  click  on  the  _r_a_s_t_e_r map layer to be used DDoouubbllee
       click here to cancel


OOUUTTPPUUTT
       If the user selects a file name from the  displayed  menu,
       _d_._a_s_k writes three lines to standard output:


       nnaammee==_f_i_l_e___n_a_m_e		mmaappsseett==_m_a_p_s_e_t___n_a_m_e	    ffuullll--
       nnaammee==_f_i_l_e___n_a_m_e_@_m_a_p_s_e_t___n_a_m_e



       The output is in the form of /bin/sh commands to  set  the
       variable  _n_a_m_e  to the file name specified by the user (of
       the _e_l_e_m_e_n_t type requested by _d_._a_s_k), _m_a_p_s_e_t to the  GRASS
       mapset  in  which  this	file resides, and _f_u_l_l_n_a_m_e to the
       name of the file and its mapset.


       If the user elects  not	to  select  a  file  but  instead
       chooses	the  "Double  click  here  to cancel" option, the
       mouse will be deactivated and no variable assignments will
       be returned to standard output.


       If no files of the specified _e_l_e_m_e_n_t 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:


       NNoo _e_l_e_m_e_n_t description files found CClliicckk hheerree ttoo ccoonnttiinnuuee




NNOOTTEESS
       Parameter values (the _e_l_e_m_e_n_t name  and	description,  and
       _p_r_o_m_p_t message) cannot be supplied to _d_._a_s_k interactively;
       they must be supplied on the command line or from a  file.

SSEEEE AALLSSOO
       _g_._a_s_k_,

       _g_._f_i_l_e_n_a_m_e_,

       _g_._f_i_n_d_f_i_l_e_,

       _g_._g_i_s_e_n_v_,

       _g_._m_a_p_s_e_t_s

BBUUGGSS
       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 ele-
       ment is chosen.

AAUUTTHHOORR
       Michael	Shapiro,  U.S.	Army   Construction   Engineering
       Research Laboratory

       _L_a_s_t _c_h_a_n_g_e_d_: _$_D_a_t_e_: _2_0_0_2_/_0_1_/_2_5 _0_5_:_4_5_:_3_2 _$



GRASS 5.0						 d.ask(1)
