WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Boxes Functions
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Scrolling Text Example

Keywords:    scrolling text boxes

;Scrolling texte messages to show process progress
;==============================================================================
;Raymond Chevalier, November 2001
;==============================================================================
;the displayed text in the message box is stored in SCROLL_TXT
;NEWLINE is the new line that has to be inserted at the end of the display
;9 is the maximum number of lines in the message box
#DefineFunction scroll(newline, scroll_txt)
   if scroll_txt == "" then scroll_txt = newline
                       else scroll_txt = strcat(scroll_txt, @tab, newline)
   while itemcount(scroll_txt, @tab) > 9
      scroll_txt = itemremove(1, scroll_txt, @tab)
   endwhile
   BoxText(Strreplace(scroll_txt, @tab, @crlf))
   RETURN scroll_txt
#EndFunction

;initialise
scroll_txt = ""
BoxOpen("Scrolling Example","")

for x = 1 to 20
   timedelay(1)
   newline=strcat(strfill(" ", x), "this is line ", x)
   scroll_txt = scroll(newline, scroll_txt)
next
message("DONE!","Example complete.")
exit


Article ID:   W15112
File Created: 2002:09:05:13:49:44
Last Updated: 2002:09:05:13:49:44