private boolean runScript(GhidraState scriptState, GhidraScript script) {
		ResourceFile srcFile = script.getSourceFile();
		String scriptName =
			srcFile != null ? srcFile.getAbsolutePath() : (script.getClass().getName() + ".class");

		try {
			Msg.info(this, "SCRIPT: " + scriptName);
			ScriptControls controls = new ScriptControls(System.out, System.err, TaskMonitor.DUMMY);
			script.execute(scriptState, controls);
		}
		catch (Exception exc) {
			Program prog = scriptState.getCurrentProgram();
			String path = (prog != null ? prog.getExecutablePath() : "Current program is null.");
			String logErrorMsg =
				path + "\nREPORT SCRIPT ERROR: " + scriptName + " : " + exc.getMessage();
			Msg.error(this, logErrorMsg, exc);
			return false;
		}

		return true;
	}
Runs the specified script with the specified state.

@param scriptState  State representing environment variables that the script is able
		to access.
@param script  Script to be run.
@return  whether the script successfully completed running
Ghidra/Features/Base/src/main/java/ghidra/app/util/headless/GhidraScriptRunner.java