Xcmd's & xfcn's – Det-Tronics Mac - w/Supercard User Manual
Page 70

XCMD's & XFCN's
4.6
95-8434
While the operator is looking at the event log, a new event might occur.
The following script checks for new events during idle and displays any
new event. This script is similar to the one above. The difference is that
some things are done at a different time.
on idle
global lastEventCount
put GetNumLoggedEvents() into theNumber
put theNumber - lastEventCount into numberToGet
if numberToGet > 0 then
set the cursor to watch
set the lockScreen to true
put lastEventCount into count
repeat for numberToGet
put GetALoggedEvent(count) into tempString
put count + 1 into count
put char 76 of tempString into colorKind
delete char 76 of tempString
put tempString into line count of card field AlarmField
select line count of card field AlarmField
if colorKind = 1 then
set the textColor of card field AlarmField to 256
else if colorKind = 2 then
set the textColor of card field AlarmField to 7
else if colorKind = 3 then
set the textColor of card field AlarmField to 108
else if colorKind = 4 then
set the textColor of card field AlarmField to 10
end if
end repeat
put theNumber into lastEventCount
set the lockText of card field AlarmField to false
— it was true from above script
select after last char of card field AlarmField
set the lockText of card field AlarmField to true
set the lockScreen to false
set the cursor to arrow
end if
end idle