This is documentation for Mathematica 4, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)
Wolfram Research, Inc.

Manipulating Notebooks from the KernelAdvanced Topic: Executing Notebook Commands Directly in the Front End

2.10.4 Manipulating the Front End from the Kernel

Manipulating global options in the front end.

Just like cells and notebooks, the complete Mathematica 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.

In[1]:= $FrontEnd

Out[1]=

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

In[2]:= Options[$FrontEnd, NotebookDirectory]

Out[2]=NotebookDirectory$TopDirectory

A few global options for the Mathematica front end.

By using NotebookWrite you can effectively input to the front end any ordinary text that you can enter on the keyboard. 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.

Manipulating Notebooks from the KernelAdvanced Topic: Executing Notebook Commands Directly in the Front End