WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: kdmoyers on June 21, 2019, 04:17:11 AM

Title: Way to monitor Box command stack?
Post by: kdmoyers on June 21, 2019, 04:17:11 AM
Is there a way to tell how full the box command stack is? 
If so, it might change how I handle something.
I'm getting near 100 items (see attached image)
Title: Re: Way to monitor Box command stack?
Post by: td on June 21, 2019, 09:44:43 AM
Not sure how much of your image is bitmap and how much is drawn on the fly but either way it is impressive.  I sometimes think that the box functions are one of the most under-appreciated and under-used features of WinBatch.

Presumably, you know that the box stack limit is 150 box commands and that you can tag and clear the stack using BoxDataTag and BoxDataClear.  However, the only way I am aware of to track the current size of the box stack is to increment a counter variable each time you add a command to the stack and decrement it each time you clear the stack.
Title: Re: Way to monitor Box command stack?
Post by: kdmoyers on June 24, 2019, 04:22:51 AM
no bitmaps, all texts, lines and circles. 

OK, I'll just keep count.  I have to add another graph. Should top out at around 125.

I could probably save quite a few items by using characters instead of drawing the little symbols.  If centered vertically and centered horizontally, it should land close to where I say.  I'll need to experiment.

Would splitting the window help?  Do I get 150 per window or 150 total?

Thanks!
Title: Re: Way to monitor Box command stack?
Post by: td on June 24, 2019, 08:57:25 AM
Quote from: kdmoyers on June 24, 2019, 04:22:51 AM
no bitmaps, all texts, lines and circles. 
All the more impressive.
Quote
OK, I'll just keep count.  I have to add another graph. Should top out at around 125.

I could probably save quite a few items by using characters instead of drawing the little symbols.  If centered vertically and centered horizontally, it should land close to where I say.  I'll need to experiment.

Would splitting the window help?  Do I get 150 per window or 150 total?

The total is per box.  The limit isn't a hard limit.  You might be able to sneak past 150 commands but it depends on the type of commands on the queue. 
Title: Re: Way to monitor Box command stack?
Post by: kdmoyers on June 25, 2019, 11:54:26 AM
<< The total is per box >>

Woo hoo! I can just put the graphs in their own sub-boxes and each box will get no where near the 150 limit.

By the way, it's very fast.  I rewrite the whole thing in response to @deEdText events on the attached dialog box, and it just flickers for an instant.

Thanks Tony