MC-Basic:event.STATE
This query returns a Long value, indicating the state of the event task.
1: Running (TASK_RUNNING)
2: Stopped due to IDLETASK or after a STEPIN instruction (TASK_STOPPED)
4. Stopped due to runtime error (TASK_ERROR)
Syntax
?<event>.State
Availability
All versions
Type
Long
Range
Returned value: 1, 2, 4
Scope
Task or Terminal
Limitations
Event must be loaded in memory(after the execution of the OnEvent statement and while calling task is running).
Examples
?Event1.State
If Event1.State = TASK_ERROR Then
‘Check if event is stopped due to run-time error