[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: Interactive inputs



Andrew,

Using show or display writes your text out to the SQR communication box (on
NT that is the black DOS box that gets fired up - on UNIX it might just be
STDIN/STDOUT I'm not sure).  To do interactive prompts use the input
command.  This will not give you any nice GUI dialogue box but will allow
the user to enter the information.  If you need something fancy then you
will have to do a workaround with another language (i.e.. have SQR
dynamically create a Java or TK script which returns the choice to SQR using
error codes or else writes choice to file which SQR program reads) or you
can create a CGI form from within your SQR and have the inputs returned to
your program.

Basically your "interactive user interface" is show/display coupled with
input statements and controlled with conditional constructs in your program.
Anything else is probably more trouble then it is worth unless you need to
present a "pretty" face to the outside world.  If you want to pursue the CGI
route then take a look at Ray Ontko's website (www.ontko.com/sqr) for the
CGI library posted there (can't remember the author's name but hopefully he
will contribute these as recipes to the SQR Cookbook <grin>).

HTH,
John Milardovic

> -----Original Message-----
> From: Andrew Rivers [SMTP:andrew.rivers@CWCOM.NET]
> Sent: Monday, August 21, 2000 7:10 PM
> To:   SQR-USERS@list.iex.net
> Subject:      Re: Interactive inputs
>
> Mark
> Yes I use the show command - I find it useful...
>
> However, it does not provide an interactive user interface:
>     i.e. A dialog box which can display message and provide user with
> optional choice to proceed.
>
> Andrew
>
> ----- Original Message -----
> From: Risman, Mark < mrisman@PAINEWEBBER.COM
> <mailto:mrisman@PAINEWEBBER.COM>>
> To: < SQR-USERS@list.iex.net <mailto:SQR-USERS@list.iex.net>>
> Sent: Monday, August 21, 2000 8:56 PM
> Subject: Re: Interactive inputs
>
> > Andrew,
> >
> > Have you tried the SHOW command instead of DISPLAY.  Personally, I'm not
> quite sure what the reason is for having both commands available in the
> SQR language (it appears to me that SHOW can do everything that DISPLAY
> can, and then some); maybe someone else out there knows the answer to this
> question.
> >
> > Hope this helps,
> > - Mark
> >
> >  -----Original Message-----
> > From: Andrew Rivers [ <mailto:andrew.rivers@CWCOM.NET>]
> > Sent: Wednesday, August 16, 2000 5:30 PM
> > To: SQR-USERS@list.iex.net <mailto:SQR-USERS@list.iex.net>
> > Subject: Interactive inputs
> >
> >
> >
> > Hi
> > I need to check interactively a value in a field within the database.
> >     e.g.
> >     User has companyID and companyName:
> >         !get companyID input from user:
> >         input $companyID
> >
> >     For the companyID that the user has input, check that the
> companyName in the database is the same as the companyName that the user
> has for the same companyID:
> >         do getCompanyNameForCompanyID
> >         display/print 'companyName'        !companyName in the database
> for the companyID that the user has input
> >
> >         Now verify the companyName and companyID are those that user
> has.
> >         So force user to input the same companyName as that returned
> from the database for the companyID which was inputted by the user:
> >         do verifyThatCompanyNameAneCompanyIDMatch    !both for those
> that user has and that are in the database.
> >
> > Print only prints after all processing has been completed.
> > Display does not give a display (Currently using SQR v4).
> >
> > Any advice on how to manage interactive inputs/outputs would be
> appreciated...
> >
> > Many thanks.
> >
> >
> > Andrew