BoxDataClear

 

Removes commands from a WinBatch box command stack.

Syntax:

BoxDataClear(box ID, tag)

Parameters:

(i) box ID the ID number of the desired WinBatch box.

(s) tag tag to be removed.

Returns:

(i) @TRUE on success; @FALSE on failure.

 

This function removes all commands added since the (BoxDataTag) "tag" from the command stack. "Tag" is not removed. All buttons and Box commands after the tag are forever erased.

Example:
 
;; sample script for BoxDataClear BoxesUp("0,0,1000,1000",@ZOOMED) ;Changes the title of a WinBatch box. BoxCaption(1,"Random Rectangles") ;Creates a push-button in a WinBatch box BoxButtonDraw(1,1, "E&xit", "750,860,900,930") ;Creates a tag entry in a WinBatch box command stack BoxDataTag(1,"ACORN") While 1 ;Removes commands from a WinBatch box command stack ;if BoxDataClear was commented out it would exceed ;the limit of commands in the stack and error BoxDataClear(1,"ACORN") If BoxButtonStat(1,1)==1 Then Break x=Random(1000) y=Random(1000) s=Random(1000) t=Random(1000) r=Random(255) g=Random(255) b=Random(255) color=StrCat(r, ",", g, ",", b) location=StrCat(x, ",", y, ",", s, ",", t) BoxColor(1,color,0) BoxDrawRect(1,location,2) EndWhile Exit
See Also:

BoxesUp, BoxNew, BoxDataTag