Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: boxesup scrolling progress box
;setup variables line1="" line2="" line3="" line4="" line5="" BoxOpen("Scrolling Example","") for x=1 to 10 gosub scroll if x != 10 line5="This is line %x%" else line5="DONE!" endif gosub update_disp delay(1) next x message("DONE!","Example complete.") exit() :update_disp line=StrCat(line1,"%@CRLF%",line2,"%@CRLF%",line3,"%@CRLF%",line4,"%@CRLF%",line5,"%@CRLF%") BoxText(line) return :scroll line1=line2 line2=line3 line3=line4 line4=line5 return
;Scrolling text messages to show process progress ;============================================================================== ;Raymond Chevalier, November 2001 ;============================================================================== #DefineFunction scroll(scroll_txt, newline) 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 ;======================================================== boxopen("Console", "") scroll_txt = scroll("", "Beginning") ;some code here scroll_txt = scroll(scroll_txt, "Line 2...") ;some code here scroll_txt = scroll(scroll_txt, "Line 3...") ;Etc....
hker = DllLoad("KERNEL32.DLL") DLLCall(hker, long:"AllocConsole") hStdOutput = DLLCall(hker, long:"GetStdHandle", long:-11) linebuff = binaryalloc(256) mret = BinaryAlloc(4) for i = 1 to 200 line = strcat("Hello there ", i, @CRLF) binarypokestr(linebuff, 0, line) DLLCall(hker, long:"WriteConsoleA", long:hStdOutput, lpbinary:linebuff, long:strlen(line), lpbinary:mret, lpnull) next Message("", "done") DLLCall(hker, long:"FreeConsole") dllfree(hker) binaryfree(linebuff) binaryfree(mret)
Article ID: W12769
Filename: Scrolling Status Screen Box.txt
File Created: 2002:06:17:11:34:40
Last Updated: 2002:06:17:11:34:40