private String sendScript(String[] token, Class klass) {
		if (token[2] != null) {
			token[2] = token[2].trim();
			if (token[2].length() > 0) {
				int n = -1;
				try {
					n = Integer.valueOf(token[1].trim()).intValue();
				} catch (NumberFormatException e) {
				}
				Object o = null;
				if (n > 0) { // use index
					o = getEmbeddedComponent(klass, n - 1);
				} else { // try UID
					o = getEmbeddedComponent(token[1].trim());
				}
				if (o instanceof Scriptable)
					return ((Scriptable) o).runScript(token[2]);
				if (o instanceof NativelyScriptable)
					return ((NativelyScriptable) o).runNativeScript(token[2]);
			}
		}
		return writeErrorMessage(Arrays.asList(token) + " for " + klass);
	}