Database of Messages

John Esak john at valar.com
Tue Aug 17 02:39:10 PDT 2004


> > My second mixed question, from the day of heavy drug use ;~), is
> > the creation of a database of messages.  I can use msgbox and
> > create multi-line messages but it would be nice to create a
> > database of messages that I could call as needed for those
> > mundane over and over messages that you need in processing.  As I
> > see it, I think it needs to have the ability to have multiple
> > lines.  If I am missing something obvious, which I am sure that I
> > am, please point it out so that I can go crawl under my rock
> > again.  Thanks for the suggestions.
>
> John Esak showed me an easy way to display a message that could be
> customized exactly the way you want it to be and I think this would
> work well in your case.
>
> Design a screen with the text, colour and border just the way you want
> it and use popup (row,col) filename,screen to display the message and
> clearp to remove. By using this method you could create any number of
> messages and have processing access them when required.
>
> Tony Ryder


Yes, I do:

   @wefxxx  if:
          then: popup pop,"message1";  end

   @wlfxxx  if:
          then: clearp
            if:
          then: blah blah ...

but, I also have an on-the-fly syntax which is really need. It is up in the
FP Room file sharing system somewhere... wait, I'll try and find it...

Funny, it wasn't there. I only have some Netcat files in my folder there. I
must have cleaned house recently. Oh well, here it is:

This is a process stub for asking any Yes/No question that disallows any
other keystrokes. You set the message, the prompt and the keys in the little
"ask_YN" section, (of which there can be many in any processing table and it
gosubs to mesgYN. I use this a lot with various messages and prompts (and
positions for the mesgbox itself on the screen).  It has become a staple of
my processing code. (I use a similar non-interactive syntax to put up an
ERRORBOX instead of a MESGBOX with varying "error message blah blah...". I
may use this more than the process shown below. It merely means I have to
say:  e="the error I want to show..."; gosub errorr.  The error is shown and
they have to press Enter to make it go away. It, too, has variable screen
positioning as the little routine below.


mesgYN:'mesgYN::
::declare msg, prompt, keys:
::declare row(2,.0), col(2,.0):
mesgYN2::msgbox (row,col) msg,prompt,keys:
:@sk eq "BRKY":goto mesgYN:
:@sk eq "ENTR":goto mesgYN:
::return:
ask_YN:'ask_YN::
::msg="This will cancel the\nentire function!":
::prompt="Are you SURE you want to do this y/n?":
::keys="YN":
::row="9";  col="2":
::gosub mesgYN:
:@bk eq "Y":goto somewhY   else:
:@bk eq "N":goto somewhN:
somewhY:'somewhY::
somewhN:'somewhN::



More information about the Filepro-list mailing list