private void runScript(String string) throws Exception {
		GhidraScript ghidraScript = getGhidraScript(string);
		GhidraState scriptState = new GhidraState(null, null, null, null, null, null);
		runScript(scriptState, ghidraScript);
	}
A simple class for running scripts outside of Ghidra.
Ghidra/Features/Base/src/main/java/ghidra/app/util/headless/GhidraScriptRunner.java