Chapter 6. Macros and the Console plugin

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

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

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

void runCommandToBuffer(View  view,
 String  shell,
 String  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,
 String  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(String name, String 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.