else if (ScriptRegistry.containsScript(aH.getStringFrom(arg))) {
script = aH.getScriptFrom(arg);
if (!script.getType().equalsIgnoreCase("TASK"))
script = null;
} else throw new InvalidArgumentsException("Unknown argument '" + arg + "'!");
}
// Must specify at least a valid script to run...
if (script == null)
throw new InvalidArgumentsException("Must define a SCRIPT to be run.");
// If not queue, and delayed, throw an exception... this cannot happen.
if (queue.equals(scriptEntry.getResidingQueue().id) && delay != null)
throw new InvalidArgumentsException("Cannot delay an INJECTED task script! Use 'QUEUE'.");
// Put important objects inside the scriptEntry to be sent to execute()
scriptEntry.addObject("instant", instant)
.addObject("queue", queue)
.addObject("delay", (delay != null ? delay.setPrefix("Delay") : null))