protected String useTaskScripts(String script) {
		int i = script.indexOf("runtask");
		if (i == -1)
			return script;
		int j = 0;
		List<String> list = new ArrayList<String>();
		String taskName;
		while (i != -1) {
			list.add(script.substring(j, i));
			i += 7;
			j = script.indexOf(";", i);
			taskName = script.substring(i, j).trim();
			Loadable task = model.getJob().getTaskByName(taskName);
			if (task == null) {
				out(ScriptEvent.FAILED, "Task not found: " + taskName);
			}
			else {
				list.add(task.getScript());
			}
			j++;
			i = script.indexOf("runtask", j);
		}
		list.add(script.substring(j));
		script = "";
		for (String s : list)
			script += s;
		return script;
	}