Display a window whilst a script is running

Started by tsgjersey, August 11, 2022, 07:46:50 AM

Previous topic - Next topic

tsgjersey

Hi,

We have a script that runs for about 30 seconds and I would like to display a window to the user whilst the script is running and then hide the window when the script has finished.

I have seen the Message and Display but I cannot see a way to have them stay open until I specifically close them from within the script.

Is there a way to do this?

Thanks

JTaylor

Depends on what type of Window you want.     The most basic thing is you could do WinShow("") and it will display the window of the script you are running.   If needed, if you look at the WinBatch.chm file, it will give you options for making it prettier.

Jim

kdmoyers

Take a look at the BoxXxxxx functions.  They are prefect for quick and dirty dialogs like this.

Code (winbatch) Select
  BoxOpen("Hello", "how are you?")
  boxbuttondraw(1,1,"exit early","500 500 999 999")
  boxdatatag(1,"tag") ; mark this box status

  for i = 1 to 2000
    timedelay(0.01) ; do stuff that takes time

    boxdataclear(1,"tag") ; return to that box status
    boxtext("count is ":i)
    if boxbuttonstat(1,1) then exit
  next i
  Boxtext("see ya")
  timedelay(1)
The mind is everything; What you think, you become.

tsgjersey

Thanks guys that is really helpful and exactly what I needed to point me in the right direction.