Equinox Online Help - Language Reference - A to Z

Home

EnableInput

Applies to
SyntaxEnableInput [BreakExpression] [, ProcessingExpression] [, CursorType]
Action[Statement] Allows you to control background message processing.
ScopeUsable anywhere
Notes

This statement allows you to control the following:

  • What happens when you presses Control Break during a method.
  • Whether user input (and other system activity) is processed while a method is running.
  • The style of mouse cursor displayed.

The Control Break key combination is controlled by the first argument, BreakExpression. If the expression evaluates to one (the default), then you may abort any method by pressing Control Break. An error dialog is displayed, with the message "Break Occurred". If the argument is set to zero, then you cannot abort a method using Control Break.

If the second argument, ProcessingExpression, is set to one, then Equinox will process system messages at suitable intervals; what this means is that other Windows programs and tasks get a chance to run (albeit slowly), PrintWindow contents are updated etc. If it is set to zero, (the default) then Equinox ignores any user input (except Control Break) or system messages that are generated while a method is running; Equinox will appear to "freeze" while the method is running.

If you omit ProcessingExpression, it remains unchanged. Furthermore it does not affect the operation of statements such as Input, Pick and Alert, which work normally and allow Windows to run in the background.

You may also specify the processing intervals, by setting ProcessingExpression to an integer value other than zero or one. Positive integers are treated as the number of tenths of a seconds between intervals. Equinox interprets a value of -1 as "very often" and other negative values as minus the number of internal cycles minus one between checks. The use of negative values is an advanced feature which significantly affects the performance of the method language and which produces different results on different hardware.

Finally, if ProcessingExpression is set to a non-zero value, Windows is given a chance to run immediately after theEnableInput statement. An alternative procedure to make a tight method language loop more responsive is therefore to put EnableInput ,1 inside the loop.

The third argument, CursorType, sets the mouse cursor type. The values are interpreted as following:

  • 0 normal cursor
  • 1 wait cursor

Values greater than one set various different types of cursor, depending on your system. If this argument is omitted, the cursor type is not affected.

The defaults for BreakExpression, ProcessingExpression and CursorType are set when Equinox starts and any changes remain in force until Equinox terminates.

CategoryFlow Control
See Also Block_EndBlock, BreakPressed, Continue, Execute, Exit, For...Next, Goto, If_Then, Repeat_EndRepeat, Repeat_Until, Return, Sleep, Subtable, Switch, While_EndWhile
Example

The first example disables the Control Break key.

EnableInput False

The next example leaves Control Break sensitivity and mouse cursor unchanged and allows Equinox to process messages during methods.

EnableInput ,True

This example makes the mouse cursor into a wait cursor, without affecting Control Break or message handling.

EnableInput ,,1

The final example enables the Control Break key and allows Equinox to process messages every two seconds (during methods).

EnableInput 1,20