/*------------------------------------------------------------------------- /* Environmental Systems Research Institute /*------------------------------------------------------------------------- /* Program: MSWORKING.AML /* Purpose: Display a menu with information that an action is taking /* place (let the user know that something is happening). /* The message can be updated by using the UPDATE routine. /* /*------------------------------------------------------------------------- /* Usage: msworking {INIT} <'message_1'> {'message_2'} {'position'} {'stripe'} /* Usage: msworking /* /* Arguments: routine - routine to be run /* /* message_1 - The first line of the message to be displayed /* message_2 - The second line of the message to be displayed /* position - (quoted string) menu position /* stripe - (quoted string) menu stripe /* /* Globals: /*------------------------------------------------------------------------- /* Calls: MSWORKING.MENU /*------------------------------------------------------------------------- /* Notes: All arguments must be quoted, and each of the message /* arguments should contain no more than 80 characters. /*------------------------------------------------------------------------- /* Input: /* Output: /*------------------------------------------------------------------------- /* History: Matt McGrath - 02/14/92 - Modified INFORM tool /* bernie szukalski - 09/16/92 - added UPDATE routine, changed /* variable naming. /* bernie szukalski - 01/21/93 - added position & stripe args /*========================================================================= /* &args routine message_1 message_2 position stripe &severity &error &routine bailout /* Check arguments &if [NULL %routine%] &then &call usage /* Default to the init routine if no routine has been specified /* &set routinelist = INIT UPDATE EXIT CLOSE USAGE &if [KEYWORD %routine% %routinelist%] > 0 &then /* A routine has been specified &do &if [LOCASE %routine%] = init &then &do &set .msworking$message1 = [UNQUOTE %message_1%] &set .msworking$message2 = [UNQUOTE %message_2%] &end &end &else /* A routine has not been specified, default to init &do &set stripe = %position% &set position = %message_2% &set .msworking$message2 = [UNQUOTE %message_1%] &set .msworking$message1 = [UNQUOTE %routine%] &set routine = INIT &end /* &call %routine% /* &return /*------------ &routine UPDATE /*------------ &set .msworking$message1 = [UNQUOTE %message_1%] &set .msworking$message2 = [UNQUOTE %message_2%] &thread &synchronize tool$msworking &return /*------------------ &routine USAGE /*------------------ &type Usage: msworking &type Usage: msworking INIT <'''message_1'''> {'''message_2'''} {'''position'''} {'''stripe'''} &type Usage: msworking CLOSE &return &warning *------------------- &routine INIT /*------------------- /* /* Check arguments &if [NULL [VALUE .msworking$message1]] &then &call usage /* &if [NULL %.msworking$message2%] OR ~ [QUOTE [UNQUOTE %.msworking$message2%_]] = [QUOTE #_] &then &set .msworking$message2 /* &if [NULL %position%] OR %position%_ = #_ &then &set position = &cc &screen &cc &if [NULL %stripe%] or %stripe%_ = #_ &then &set stripe = Working... /* /* Set the icon to be displayed in the menu &set iconname = hourgls32.icon /* /* Size the message menu based on the message string length /*&set xsize = [LENGTH [QUOTE %message%]] * 10 + 60 /*&if %xsize% lt 250 &then &set xsize = 250 /*&set size = %xsize% 125 /* &if not [SHOW &thread &exists tool$msworking] &then &thread &create tool$msworking ~ &menu msworking ~ &position [UNQUOTE %position%] ~ &stripe [QUOTE [UNQUOTE %stripe%]] ~ &pinaction '&run msworking exit' &thread &synchronize tool$msworking /* &return /*------------------- &routine EXIT /*------------------- /* Clean up /* &dv .msworking$* &if [SHOW &thread &exists tool$msworking] &then &thread &delete tool$msworking /* &return /*------------------- &routine CLOSE /*------------------- /* Clean up &call exit /* &return /*------------------ &routine BAILOUT /*------------------ &severity &error &ignore &severity &warning &ignore /*&call exit &return &warning An error has occurred in routine: %routine% (MSWORKING.AML) /*----------------- &routine SAFETY_NET /*----------------- &return