!7 srecord ScriptItem(S desc, S code) { Double seconds; S status; *(S *desc, S *code, double *seconds) {} } sclass Scripter extends DynObjectTable { int iRunning; S status; start { setData(ll( ScriptItem("Say 1", [[infoBox("1")]], 4.0), ScriptItem("Say 2", [[infoBox("2")]], 4.0) )); } visualize { ret centerAndSouthWithMargin(super.visualize(), centerAndEast(dm_fieldLabel('status), jbutton("Run", r runIt)); } void runIt { thread "Run Script" { setField(status := "running"); afterwards { setField(status := "done"); } while (iRunning < l(data)) { ScriptItem item = get(data, iRunning); item.status = "running"; updateTable(); setField(iRunning := iRunning+1); sleepSeconds(toDouble(item.seconds)); item.status = "done"; updateTable(); } } } }