The progressalert statement displays a progress alert if an operation is going to take a long time.


This statement has three parameters:

options – a dictionary that contains options for controlling the operation of the alert (see details below).

value – current amount of progress, from 0 to maximum (must call with 0 to start, and with –1 to finish).

maximum – maximum value.


This statement displays an alert that displays progress while a long operation takes place. The idea is that your program calls this statement over and over during the long operation, informing the statement of how much progress has been made.

Here is a simple example that displays progress as a loop is performed. Of course if this was a real application, something useful would happen inside the for loop, but in this example nothing happens except that the progress alert counts down.

local pinfo,x,max
pinfo = initializedictionary(
    "TITLE","Progress Test",
for x,0,max
    progressalert pinfo,x,max
progressalert pinfo,-1,max

Notice that you must call the progressalert statement one last time at the end with a value of –1. If you fail to do this, the progress alert will be stuck and you’ll have to force quit Panorama.

The first parameter contains a dictionary with options that modify the operation of the alert. If you just want the default options, you can pass "" for this parameter. The options available are described below.


The progressalert statement normally displays the progress in an independent pop-up alert. If you would prefer that the progress be displayed in an alert sheet that is attached to the current window, set this option to true.


The default title is Please wait. If you want a different title, specify it with this option. Note: If the sheet option is used (see above), no title is displayed.


This is your initial guesstimate of how long it will take to complete the operation. If you don’t have any idea, just omit this option and Panorama will figure it out for itself, though it may take a few seconds to come up with a reasonably accurate estimate.


Some operations may be short in some cases and long in other cases. With this option, you can specify that if the operation is going to complete quickly, the alert won’t even appear. The default is 5 seconds – in other words, if Panorama estimates that the operation is going to take less than 5 seconds, it won’t display the progress alert. If the esimate goes over 5 seconds the alert will automatically appear. If the dontbother option is set to 0 then the alert will always appear, no matter what the estimate is.


Panorama 6 had some additional options, including MagicWindow, MagicDatabase, MagicForm and Handler. In Panorama X these options are no longer required, and will be ignored if they are provided.

See Also


10.0UpdatedCarried over from Panorama 6.0, but no longer supports options for magicwindow, magicform, magicdatabase, or handler. The sheet option is new.