Manipulating the Front End from the Kernel

Manipulating global options in the front end.

Just like cells and notebooks, the complete Wolfram System front end has various options, which you can look at and manipulate from the kernel.

This gives the object corresponding to the front end currently in use:

$FrontEnd

This gives the current directory used by the front end for notebook files:

Options[$FrontEnd,NotebookBrowseDirectory]

A few global options for the Wolfram System front end.

By using (RefLink[NotebookWrite, paclet:ref/NotebookWrite]) you can effectively input to the front end any ordinary text that you can enter on the keyboard. (RefLink[FrontEndTokenExecute, paclet:ref/FrontEndTokenExecute]) allows you to send from the kernel any command that the front end can execute. These commands include both menu items and control sequences.

Executing a named command in the front end.

A few named commands that can be given to the front end. These commands usually correspond to menu items.