private void executeCommand() {
		String strCommand = console.getCommandString().trim();
		if (strCommand.length() == 0)
			return;
		console.requestFocusInWindow();
		if (strCommand.equalsIgnoreCase("clear") || strCommand.equalsIgnoreCase("cls")) {
			clear();
			return;
		}
		console.appendNewline();
		console.setPrompt();
		BasicModel m = getBasicModel();
		if (m == null)
			return;
		if (m instanceof PageMolecularViewer) {
			// we should not have had to do this to link the console with the viewer
			((PageMolecularViewer) m).setScriptConsole(this);
		}
		if (m instanceof PagePlugin) {
			((PagePlugin) m).runNativeScript(strCommand);
		}
		else {
			String strErrorMessage = m.runScript(strCommand);
			if (strErrorMessage != null)
				console.outputError(strErrorMessage);
		}
	}