Test if running in background

Command group Flag affected Reversible Execute on client Platform(s)
Omnis environment YES NO NO All

Syntax

Test if running in background

Description

This command tests if Omnis is running in the background, that is, it sets the flag if Omnis is not the top application window.

Windows, macOS, and Linux all provide multi-tasking facilities. When another program is running, with Omnis in the background, you can continue with tasks such as importing data although the processor's time becomes shared between the current tasks. You can use this test to alter the behavior of the library when it becomes the background task.

Example

; Bring Omnis back to the front when another application goes to top
Show Omnis minimized

Calculate #F as kFalse
While flag false
  Test if running in background
End While
Show Omnis normal