Working message

Command group Flag affected Reversible Execute on client Platform(s)
Message boxes NO NO NO All


Working message title ([Cancel button][,Repeat count]) {message}


Cancel button If specified, the message has a cancel button
Repeat count If specified, the message displays a numeric repeat count (an internal value that increments during method execution)


This command displays a window, usually to indicate that Omnis is working or waiting for input. The window displays an alternating icon to indicate that Omnis is actively working. A working message automatically closes when the method quits, and control returns to the user.

The Title parameter contains a title for the working message window, together with parameters that configure the behavior and appearance of the window. The method editor has a Configure button that you can use to easily set these parameters. The Title parameter has the following syntax:

<Title text>/<start id>,<end id>;<speed>;<progress bar range>;<display delay>

start id and end id specify a range of icon ids, which identify the icons drawn in the alternating sequence on the working message window. These are usually negative numbers, as each id is the sum of the icon id and the value of the constant k16x16, k32x32 or k48x48, to indicate the size of the icon. These icons can come from #ICONS for the library, or OmnisPic or UserPic.

speed indicates the time, in 1/60th second units, that an icon in the alternating sequence is displayed.

progress bar range specifies the range of a progress bar. If you specify a non-zero value, then the working message window displays a progress bar, and each call to the Working message command increases the length of the bar until it reaches the range.

display delay specifies the time in 1/60th second units, that must elapse before the working message window becomes visible. This allows you to use the Working message command in situations where the processing is sometimes very rapid, and in that case avoid the message displaying and disappearing almost immediately.

If a working message is placed in a loop with a Cancel button, pressing Ctrl-break/Ctrl-C/Cmnd-period or clicking on Cancel quits all methods. However, if you first execute Disable cancel test at loops, you can implement an orderly exit. If Disable cancel test at loops is executed before the loop, the cancel is detected only on executing the Working message.

Repeat count option is available with Working message, and displays the value of an internal counter which indicates the number of times a particular Working message has been encountered. If the command is in a Repeat loop, the counter increments at each pass of the loop.


; Working message with orderly exit
Begin reversible block
  Disable cancel test at loops
End reversible block
Working message (Cancel button) {Processing Record [lCount]}
For lCount from 1 to 20000 step 1
  Redraw working message
  If canceled
    Break to end of loop
  End If
End For
OK message {All done}