Chapter 7. Macros and the Console plugin

The Console plugin defines three BeanShell convenience methods that can be called from macros:

void runCommandInConsole ( view,
  view,
  shell,
  command);

Runs command in the shell named shell. Will open a console window if one is not already open.

void runCommandToBuffer ( view,
  view,
  shell,
  command);

Runs command in the shell named shell, placing the command's output in a new buffer. Will open a console window if one is not already open.

void runInSystemShell ( view,
  view,
  command);

Equivalent to calling:

runCommandInConsole(view,"System",command);

void waitForConsole (View view );

Waits until the currently executing command finishes before returning.

void clearConsole (View view );

Clear's the console's output area.

void getenv (String name );

Returns the specified environment variable.

void setenv ( name,
  name,
  value);

Sets the specified environment variable to a new value.

If a command is run from the console while macro recording is in progress, a call to one of these methods is recorded automatically.