| Author |
Comment/Response |
Alexander Peterhansl
|
01/24/01 09:31am
The function below creates a notebook, inserts some text, evaluates the text, then saves and closes the notebook:
experiment[] := Module[{nb},
nb = NotebookCreate[];
NotebookWrite[nb, ''1+2'', All];
SelectionEvaluateCreateCell[nb];
NotebookSave[nb, ''experiment.nb''];
NotebookClose[nb];
]
The problem is that ''1+2'' never gets evaluated as the notebook is saved before that happens. Is there a way to make sure that a command has been fully executed before the next command is invoked?
I would like to use the above function with commands that take MUCH longer to execute than 1+2 (on the order of 30 minutes).
URL: , |
|