OK, by bringing together a few things found on the forum, I've come up with a method that works well enough. At the start of the TimeOut it hides the command bar, blocks user input, and hides the compass etc at the right (otherwise they're visible and look like they can be clicked). Then it reverses that at the end. Hyperlinks in the text remain visible but the cursor doesn't change when you hover, so the user should get the drift.
No doubt there are more elegant solutions, but this works.
First add this Javascript, which combines someone's "window blocking" and unblocking script with hiding/showing things in the Panes that allow input (note that this includes "Inventory2" because my game also has a spell inventory).
function blockWindow()
{
$('#compassAccordion').css('display', 'none')
$('#placesObjectsAccordion').css('display', 'none')
$('#inventoryAccordion').css('display', 'none')
$('#Inventory2Accordion').css('display', 'none')
var div = document.createElement('blockdiv');
div.id='blockdiv';
div.style.cssText = 'position:absolute;'
+ 'width:100%;top:0;left:0;text.align:center;'
+ (navigator.userAgent.indexOf('MSIE') > -1
? 'filter:alpha(opacity=50);'
: 'opacity:0_5;'
) + 'background.color:#ffffff;';
var height = (window.innerHeight
? window.innerHeight
: (document.documentElement
? document.documentElement.offsetHeight
: document.body.offsetHeight
)
);
div.style.height = height + 'px';
document.body.appendChild(div);
}
function unblockWindow(){
var div = document.getElementById('blockdiv');
document.body.removeChild(div);
$('#compassAccordion').css('display', 'block')
$('#placesObjectsAccordion').css('display', 'block')
$('#inventoryAccordion').css('display', 'block')
$('#Inventory2Accordion').css('display', 'block')
}
And to the Quest program add this function that calls the Javascript as well as handling the Command line. Here it also scrolls to the end on unblocking, as my purpose for this always involves text:
<function name="BlockInput" parameters="blocking">
if (blocking) {
request (Hide, "Command")
JS.blockWindow ()
}
else {
JS.unblockWindow ()
request (Show, "Command")
JS.scrollToEnd ()
}
</function>
Then if using a SetTimer (sec) {block}, call BlockInput (true) at the start and BlockInput (false) at the end, like this:
BlockInput (true)
SetTimeout (4) {
msg ("Exciting text 1!")
JS.scrollToEnd ()
SetTimeout (4) {
msg ("Exciting text 2!")
JS.scrollToEnd ()
SetTimeout (4) {
msg ("Exciting text 3!")
JS.scrollToEnd ()
SetTimeout (4) {
msg ("Exciting text 4!")
IncreaseScore (100)
EnableTurnScript (BeastChase)
BlockInput (false)
}
}
}
}