Jim

I like this alot and consider it the best yet - CHAR(91) works well.

I know that CHAR(13) is the [Enter] key, but what is CHAR(13)+CHAR(10)?
That is a simpler way to create the multi line pause box than my LJS method!

David BLocker

----- Original Message -----
From: "Jim Limburg" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, June 17, 2002 1:46 PM
Subject: RE: PAUSE 4 and Screen Flicker


> Javier, David
>
> I have done a bit of tweaking myself to this cool code..
> Run this in a Win version and watch the results..
> I have found a balance between the vmsg, & the vmsg1
> variables to let me have just the right size message box
> and still get the message to change on the second line.
> One space larger or smaller throws this out of kilter.
> or using a bar representation character that has a larger
> pixel representation will throw chunks as well, but hey
> it works.
>
> CLS
> SET VAR vnr INTEGER
> SET VAR vinc INTEGER
> SET VAR von INTEGER
> SET VAR vpct INTEGER
> SET VAR vno_recs = 100000
> SET VAR vm_crlf TEXT = ((CHAR(13)) + (CHAR(10)))
> SET VAR vmsg = 'Processing .. PLEASE WAIT'
> SET VAR vmsg1 = 'Processing .. PLEASE WAIT' + .vm_crlf + +
> '                          .'
> PAUSE 3 USING .vmsg1 AT 5 10
> --'Going from 1 to 100,000 by 2 pct incr / a bargraph display' AT 5 10
> SET VAR vinc = (.vno_recs / 50)
> SET VAR vnr =  .vinc
> SET VAR vbar = ' '
> SET VAR von = 0
> SET VAR vpct = 2
>
> WHILE von < .vno_recs THEN
>   SET VAR von = (.von + 1)
>   IF  vnr = .von THEN
>     -- Use a character other that 62 to display a different bar style
>     --SET VAR vbar = ( .vbar  + (CHAR(124)) ) --| pipe
>     --SET VAR vbar = ( .vbar  + (CHAR(22)) ) --Good-one horizontal bar
shaped
>                                            --in dos, but pipe in win
version
>     --SET VAR vbar = ( .vbar  + (CHAR(93)) ) --]
>     SET VAR vbar = ( .vbar  + (CHAR(91)) ) --[
>     SET VAR vmessage = (  (CTXT(.vpct)) + '% ' + .vbar  )
>     WRITE .vmessage AT 20 2
>     SET VAR vmessage = (.vmsg + .vm_crlf + .vmessage)
>     PAUSE 4 USING .vmessage
>     SET VAR vpct = (.vpct + 2)
>     SET VAR vnr = (.vnr + .vinc)
>   ENDIF
> ENDWHILE
> CLEAR VAR vnr,vinc,von,vpct,vno_recs,vbar,vmessage
> --CLS
> RETURN
>
> Jim Limburg
>
> --- Javier Valencia <[EMAIL PROTECTED]> wrote:
> > David:
> > Thank you for cleaning up the code. It is nice to be able to contribute
to
> > the List considering how much benefit I have gotten from it. I just have
to
> > figure out how to display the solid block on the completion bar;
although I
> > have a hunch that version 7 may have bigger and better answers. By the
way,
> > were you able to resolve the screen flicker problem?
> >
> > Javier Valencia, PE
> > President
> > Valencia Technology Group, L.L.C.
> > 14315 S. Twilight Ln., Suite #14
> > Olathe, KS  66062-4571
> > (913)829-0888
> > (913)649-2904 FAX
> >
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> > Behalf Of David M. Blocker
> > Sent: Sunday, June 16, 2002 3:35 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: PAUSE 4 and Screen Flicker
> >
> > Javier
> >
> > Thanks for sharing these.  I've made a few minor adjustments for making
them
> > useful for teaching and here they are:
> >
> > David Blocker
> >
> >
*(**************************************************************************
> > ********************
> > **  FILENAME: PAUSE4A.RMD
> > **  CREATED BY:  Javier Valencia; posted on R:Base List server
> > **                                 6/15/2002
> > **  PURPOSE:    Demonstrate PAUSE 4 vs. WRITE command: automatically
> > rewrites in
> > **                            last PAUSE 3 box; counter bar for looping
> > programs!
> > **  DATE CREATED:  06/16/2002
> > **  LAST UPDATE:
> >
****************************************************************************
> > *****************)
> >
> > -- QUICK CODE TO SHOWS PERCENT AND PROGRESS BAR FOR A COUNTER
> > CLS
> > SET VAR vnr INTEGER
> > SET VAR vinc INTEGER
> > SET VAR von INTEGER
> > SET VAR vpct INTEGER
> > SET VAR vno_recs = 100000
> > PAUSE 3 USING 'Counting from 1 to 100,000 by 2 pct increments with +
> > a bargraph display' AT 5 10
> > SET VAR vinc = (.vno_recs / 50)
> > SET VAR vnr =  .vinc
> > SET VAR vbar = ' '
> > SET VAR von = 0
> > SET VAR vpct = 2
> >
> > WHILE von < .vno_recs THEN
> >   SET VAR von = (.von + 1)
> >
> >   IF  vnr = .von THEN
> >     -- Use a character other that 62 to display a different bar style
> >     set var vbar = ( .vbar  + (CHAR(62)) )
> >     set var vmessage = (  (CTXT(.vpct)) + ' %  - ' + .vbar  )
> >     write .vmessage at 20 2
> >     pause 4 using .vmessage
> >     set var vpct = (.vpct + 2)
> >     set var vnr = (.vnr + .vinc)
> >   ENDIF
> > ENDWHILE
> > CLEAR VAR vnr,vinc,von,vpct,vno_recs,vbar,vmessage
> > RETURN
> >
> >
> >
*(**************************************************************************
> > ********************
> > **  FILENAME: PAUSE4E.RMD
> > **  CREATED BY:  Javier Valencia posted on R:Base List server
> > **                                 6/15/2002
> > **  PURPOSE:    Demonstrate PAUSE command vs. WRITE command : show 255
> > **                            different characters to use for counter
> > percentage done bars.
> > **                            great for looping programs!
> > **  DATE CREATED:  06/16/2002
> > **  LAST UPDATE:
> >
****************************************************************************
> > *****************)
> >
> > CLS
> > SET VAR xxx = 255
> > SET VAR y = 0
> > WHILE y < .xxx THEN
> >   set var y = (.y + 1)
> >   set var z1 = (CHAR(.y))
> >   set var z = ( (CTXT(.y)) +  ' - ' + +
> >
> >
.z1+.z1+.z1+.z1+.z1+.z1+.z1+.z1+.z1+.z1+.z1+.z1+.z1+.z1+.z1+.z1+.z1+.z1+.z1+
> > +
> >   .z1+.z1+.z1  )
> >    SET VAR vMessage = ('+
> > Counting bargraph display, testing different ASCII characters from 1
to')
> >    SET VAR vMessage = ( +
> >    (LJS(.vMessage,75)) + (LJS('255. . .',75)) )
> >    SET VAR vMessage = ( (LJS(.vMessage,225)) + +
> >    (LJS('Notice how the same character displays DIFFERENTLY with WRITE
and
> > PAUSE!',75)) )
> >    SET VAR vMessage = ( +
> >    (LJS(.vMessage,375)) + +
> >    ('Testing ASCII code CHAR') + '(' + (CTXT(.y)) + ')' )
> >    SET VAR vMessage = (+
> >    (LJS(.vMessage,450)) + .z)
> >    WRITE .z
> >    PAUSE 2 using .vMessage=75
> > ENDWHILE
> > SET WIDTH 79
> > CLE VAR xxx,y,z1,z,vMessage
> > RETURN
> >
> > ----- Original Message -----
> > From: "Javier Valencia" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Friday, June 14, 2002 5:05 PM
> > Subject: RE: PAUSE 4 and Screen Flicker
> >
> >
> > > David:
> > > Here is one more for your consideration. The quick code enclosed below
> > will
> > > take the number of records and display it at 2 percent increments or
50
> > > increments for the entire set, it also displays the counter as a
progress
> > > bar (very cool). You can easily change it to display at different
> > > increments. As you will see, when you use the CHAR(219) it displays
very
> > > neatly as a bar when using the WRITE command  (great for DOS) but it
shows
> > > garbled in the message bar. I have also included a quick and dirty
code
> > that
> > > display a message (and WRITE display) for all the character codes (one
at
> > a
> > > time) as they are dependent (I think) on the character set that you
have
> > on
> > > your desktop (or R prompt as set in preferences). When I have a little
> > more
> > > time I will fine tune it to properly display a bar, in the mean time
fell
> > > free to play with it; I believe that it will take care of the screen
> > flicker
> > > as well with less load on resources. I believe that I will be using
this
> > > approach for my counters as it shows not only the percentage but a
good
> > > looking progress bar.
> > >
> > > ============================================================
> > > -- QUICK CODE TO SHOWS PERCENT AND PROGRESS BAR FOR A COUNTER
> > > CLS
> > > SET VAR vnr INTEGER
> > > SET VAR vinc INTEGER
> > > SET VAR von INTEGER
> > > SET VAR vpct INTEGER
> > > SET VAR vnr INTEGER
> > > -- PAUSE 2 USING 'Counting from 1 to 10000; now on 10000' AT 5 10
> > > SET VAR vno_recs = 10000
> > > PAUSE 3 USING 'Counting from 1 to 10000 by 2 pct increments with .with
> > > bargraph display' +
> > > AT 5 10
> > > SET VAR vinc = (.vno_recs / 50)
> > > SET VAR vnr =  .vinc
> > > SET VAR vbar = ' '
> > > SET VAR von = 0
> > > SET VAR vpct = 2
> > >
> > > WHILE von < .vno_recs THEN
> > > SET VAR von = (.von + 1)
> > >
> > > IF ( vnr = .von ) THEN
> > > -- Use a character other that 62 to display a different bar style
> > > set var vbar = ( .vbar  + (CHAR(62)) )
> > > set var vmessage = (  (CTXT(.vpct)) + ' %  - ' + .vbar  )
> > > write .vmessage at 20 2
> > > pause 4 using .vmessage
> > > set var vpct = (.vpct + 2)
> > > set var vnr = (.vnr + .vinc)
> > > ENDIF
> > > ENDWHILE
> > > CLEAR ALL VAR
> > > RETURN
> > > ============================================================
> > >
> > > The following code will display a message with the different CHAR to
see
> > > which one you want to use.
> > >
> > > ============================================================
> > > SET VAR xxx = 255
> > > SET VAR y = 1
> > > PAUSE 3 USING 'Counting from 1 to 10000 by 2 pct increments with .with
> > > bargraph display' +
> > > AT 5 10
> > > WHILE y < .xxx THEN
> > > set var y = .y + 1
> > > set var z1 = (CHAR(.y))
> > > set var z = ( (CTXT(.y)) +  ' - ' +
> > >
> >
.z1+.z1+.z1+.z1+.z1+.z1+.z1+.z1+.z1+.z1+.z1+.z1+.z1+.z1+.z1+.z1+.z1+.z1+.z1+
> > > .z1+.z1+.z1  )
> >
> === message truncated ===
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! - Official partner of 2002 FIFA World Cup
> http://fifaworldcup.yahoo.com
> ================================================
> TO SEE MESSAGE POSTING GUIDELINES:
> Send a plain text email to [EMAIL PROTECTED]
> In the message body, put just two words: INTRO rbase-l
> ================================================
> TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED]
> In the message body, put just two words: UNSUBSCRIBE rbase-l
> ================================================
> TO SEARCH ARCHIVES:
> http://www.mail-archive.com/rbase-l%40sonetmail.com/
>


================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: INTRO rbase-l
================================================
TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: UNSUBSCRIBE rbase-l
================================================
TO SEARCH ARCHIVES:
http://www.mail-archive.com/rbase-l%40sonetmail.com/

Reply via email to