MenuOpen Function

Help Contents

Introduction

Opens the currently defined drop-down menu.

Syntax

Informal or formal syntax:

MenuOpen()

Parameters

None

Return Value

An integer value indicating which menu command was selected.

Zero if the menu was cancelled without making a selection.

Remarks

Any currently running script is suspended while the menu is open.

After the MenuOpen function completes, the currently defined drop-down menu definition is reset back to empty.

Examples

In the following example, a drop-down menu consisting of Raise and Lower commands is created and opened:

(* Create and open the menu *)
MenuNew();
MenuAddEntry( "Raise", 1 );
MenuAddEntry( "Lower", 2 );
Result := MenuOpen();

(* Handle the result of the menu *)
IF Result = 1 THEN
    (* Raise selected *)
ELSEIF Result = 2 THEN
    (* Lower selected *)
END_IF

Further Information

Operator Actions

To learn where you can use this function.

Glossary

For the meaning of terms used in Fernhill SCADA.