This is documentation for Mathematica 5.2, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

Manipulating Mathematica Notebooks

A few examples of the power of notebook programming

Creating a Notebook

This creates a new notebook.

This writes an input cell into a notebook.

This moves the selection to be the whole notebook.

This evaluates the selection.

This moves before the current cell.

This finds the first 30 occurrences of 5 in the notebook.

This closes the notebook.

Generating a Notebook of Usage Messages

Here is the definition.

Running this will create a new notebook containing messages for all functions whose names start with Li.

Here is another function which writes cells directly into the current notebook.

Running this will insert new cells into the current notebook.

Creating Notebooks That Change Form

A Notebook That Changes Color

This puts a small notebook up on the screen.

Executing this makes the notebook cyclically change color.

This closes the notebook.

A Notebook That Pulsates

This puts a notebook up on the screen.

This makes the edges of the notebook pulsate.

This closes the notebook.

A Notebook That Walks around the Screen

This creates a small new notebook.

Evaluating this will make the notebook execute 100 steps in a random walk on the screen.

This closes the notebook.