public void runScript(String scriptName, String[] scriptArguments, GhidraState scriptState)
			throws Exception {
		ResourceFile scriptSource = GhidraScriptUtil.findScriptByName(scriptName);
		if (scriptSource != null) {
			GhidraScriptProvider provider = GhidraScriptUtil.getProvider(scriptSource);

			if (provider == null) {
				throw new IOException("Attempting to run subscript '" + scriptName +
					"': unable to run this script type.");
			}

			GhidraScript script = provider.getScriptInstance(scriptSource, errorWriter);
			script.setScriptArgs(scriptArguments);

			if (potentialPropertiesFileLocs.size() > 0) {
				script.setPotentialPropertiesFileLocations(potentialPropertiesFileLocs);
			}

			if (scriptState == state) {
				updateStateFromVariables();
			}

			script.execute(scriptState, getControls());

			if (scriptState == state) {
				loadVariablesFromState();
			}
			return;
		}

		boolean shouldContinue = false;

		if (!isRunningHeadless()) {
			shouldContinue = askYesNo("Script does not exist", //
				getScriptName() + " is attempting to run another script " + "[" + scriptName + "]" +
					" that does not exist or can not be found.\n \n" + // <-- spaces between \n's on purpose
					"You can silently ignore this error, which could lead to bad results (choose Yes)\n" +
					"or allow the calling script to receive the error (choose No).\n \n" + // <-- spaces between \n's on purpose
					"Do you wish to suppress this error?");
		}

		if (!shouldContinue) {
			throw new IllegalArgumentException("Script does not exist: " + scriptName);
		}
	}
Runs a script by name with the given arguments using the given state.
<p>
It attempts to locate the script in the directories
defined in <code>GhidraScriptUtil.getScriptDirectories()</code>.
<p>
The script being run uses the given {@link GhidraState} (e.g., script variables)
Any changes to the state by the script being run will be reflected in the given state
object.  If the given object is the current state, this scripts state may be changed
by the called script.

@param scriptName the name of the script to run
@param scriptArguments the arguments to pass to the script
@param scriptState the Ghidra state
@throws IllegalArgumentException if the script does not exist
@throws Exception if any exceptions occur while running the script
@see #runScriptPreserveMyState(String)
@see #runScript(String)
Ghidra/Features/Base/src/main/java/ghidra/app/script/GhidraScript.java