/*------------------------------------------------------------------------- /* Environmental Systems Research Institute /*------------------------------------------------------------------------- /* Program: DISP_HELP.AML /* Purpose: AML program which pops-up the requested help file. Follows the /* current amlpaths searching for the requested file with a .hlp /* extension. A message is displayed, if the file cannot be found. /* /*------------------------------------------------------------------------- /* Usage: help /* /* Arguments: file - The ascii file that is to be displayed /* /* Globals: /*------------------------------------------------------------------------- /* Calls: /*------------------------------------------------------------------------- /* Notes: /*------------------------------------------------------------------------- /* Input: /* Output: /*------------------------------------------------------------------------- /* History: Matt McGrath - 01/06/92 - Original coding /* ======================================================================== /* &args file &severity &error &routine bailout /* Check argument &if [NULL %file%] &then &call usage &else &call INIT &return /*------------------- &routine INIT /*------------------- /* Look for the help file in the current AMLPATH directories. /* /* Check that amlpath has been set. &if [NULL [SHOW &amlpath]] &then &return No &amlpath has been set. /* /* look for the help file &if [NULL [AFTER %file% .]] &then &set helpfile = %file%.hlp &else &set helpfile = %file% &set i = 1 /* keep track of the amlpaths to extract from the list of paths &set done = .FALSE. &do &while not %done% &set path = [EXTRACT %i% [SHOW &amlpath]]; &set i = %i% + 1 &if [NULL %path%] &then &do &set done = .TRUE. /*&run msinform [QUOTE Help file %helpfile% not found] &run msinform [QUOTE Help not yet available for %file%] &end &if [EXISTS %path%/%helpfile%] &then &do &popup %path%/%helpfile% &set done = .TRUE. &end &end /* &return /*------------------- &routine USAGE /*------------------- &return &warning Usage: DISP_HELP.AML /*------------------- &routine BAILOUT /*------------------- &severity &error &ignore &severity &warning &ignore &return &warning An error has occurred in DISP_HELP.AML /*----------------- &routine SAFETY_NET /*----------------- &return