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

Functions

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

Explanation of Negative Value in Display Function


Question:

A while back there was an explanation of how a negative time in "display" is of use, but I didn't understand it then. Could you give an example in which, say, display(-5,"a","b") would be used?

Answer:

Ummm When you hack a MSIE control into a Winbatch dialog and try to tell it to scroll down via OLE/COM apparently.

The use of a - number in a display statement was a kind of special purpose hack that, indded, seemed to fix a vary obscure issue by invisiably getting the "windows message pump" to run for a short amount of time.

The basic issue was that a MSIE browser control was hacked into a WinBatch dialog, on on some kind of Dialog Callback event, a webpage was loaded into the control, and then asked to scroll down a bit.

It *almost* worked. Via trial and error it was found that doing a normal display statement, all the desired work got done, as in order to load a webpage into the control and then instruct it to scroll down, in a dialog callback required much more message processing than was imaginable.

Although it kind of worked, the display statement popping up was quite distracting.

It turns out that the Display statement is a kind of complicated TimeDelay, except that TimeDelay is fairly simple, and Display is fairly complex in comparision.

Anyway, in short it was decided that just feeding the display a negative number as a instruction to do all the work involved in a display, but to make the window it pops up invisible would be the most straightforward way to solve the above problem.

In, oh, maybe 15 years nothing quite like this isse has ever been seen. Thus we do not expect that abyone else would be interested in this tidbit of functionality.

But it's there for the next person that needs it.


Article ID:   W16968
File Created: 2007:07:03:14:27:24
Last Updated: 2007:07:03:14:27:24