A window-close request while a script waits at its alert, confirm or
prompt opens the quit question over that dialog, and Cancel shows the
script's dialog again. When the run then ended another way (script.stop,
or the run finishing), the quit question stayed open, and Cancel showed
a dialog for a script that was no longer running.
The running-script poll now closes the quit question once the run ends,
and forgets the script's dialog under it once the run no longer waits at
that dialog.
alert(message[, title, errorIcon]), confirm(message[, noAsDflt, title])
and prompt(message, preset[, title]) are globals in a script run. In the
app the run waits at the call for the person's answer, spends no
instructions while it waits, and every dialog has Stop, which ends the
run and puts every document back. A run over MCP or the command line
takes its answers in order from script.run's answers, a list of
{kind, value} records; a missing, mismatched or unused answer ends the
run. The report lists each dialog with its answer in dialogs, with
dialogCount and dialogsTruncated.
The interpreter gains a host call that waits at the call for its
result, from the script's own code only; a dialog called in a callback
of a built-in, a getter or a conversion throws in the app.
Docs: docs/mcp.md, docs/target-app-parity.md.