#include <tads.h>

main(args)
{
for (local cur = 0; cur < 4; cur++) {
	"Wait 5s for command\n>";

	local resList = inputLineTimeout(5000);
	switch (resList[1]) {
		case InEvtLine:
			"\ncommand: <<resList[2]>>";
			break;
		case InEvtTimeout:
			inputLineCancel(true);
			"\ntimeout: <<resList[2]>>";
			break;
		default:
			"\nother event";
			break;
		}

	"\n\n";
}

"Done.";
}

