protected String readFileContents(ResourceFile script) throws IOException {
		BufferedReader reader = new BufferedReader(new InputStreamReader(script.getInputStream()));
		StringBuilder stringBuilder = new StringBuilder();

		String line = null;
		while ((line = reader.readLine()) != null) {
			stringBuilder.append(line).append('\n');
		}

		reader.close();

		return stringBuilder.toString();
	}
Run the last script by pressing the last script button and return output.

@param taskName name for the task listener
@return script output written to the console
@throws Exception on failure, e.g. timeout
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/script/AbstractGhidraScriptMgrPluginTest.java