interrupt

Typefunction
DictionaryLCS
LibraryLiveCode Script
Syntax
the interrupt
interrupt()
Summary

Returns true if the allowInterrupts property is false and the user has attempted to halt the current handler with a key combination.

Introduced1.0
OSmac, windows, linux, ios, android
Platformsdesktop, server, mobile
Example
if the interrupt then doCleanExit
Values
NameTypeDescription
return

The interrupt function returns true or false.

RelatedProperty: allowInterrupts, lockErrorDialogs
Message: errorDialog
Glossary: property, return, key combination, handler, Windows, exit, Mac OS, Unix
Control Structure: function
Description

Use the interrupt function within a handler to check whether the user has attempted to stop the handler by typing Control-period or Control-break (on Windows or Unix) or Command-period (on Mac OS).

Normally, pressing one of the key combinations stops any running handlers. If the allowInterrupts property is set to false, the user cannot interrupt a handler in this way.

To let the user interrupt a handler when the allowInterrupts is false, check the interrupt function periodically. If it returns true, the user has attempted to stop the handler. You can then perform any needed cleanup tasks before exiting the handler.

Tagsui