Re: Notebook that auto-executes when opened?
- To: mathgroup at smc.vnet.net
- Subject: [mg97284] Re: Notebook that auto-executes when opened?
- From: ragfield <ragfield at gmail.com>
- Date: Tue, 10 Mar 2009 05:33:26 -0500 (EST)
- References: <gp2bgq$911$1@smc.vnet.net>
On Mar 9, 1:04 am, AES <sieg... at stanford.edu> wrote:
> Possible to set an option for a notebook such that it automatically
> begins executing when opened, that is, when the nb icon is dbl-clicked
> on the desktop, or however else files are opened in the operating system
> that's being used?
Notebook[{Cell[
BoxData[DynamicBox[
ToBoxes[$CellContext`x =
FrontEndTokenExecute["EvaluateNotebook"];
Print["Evaluating Notebook..."]; $CellContext`x,
StandardForm]]], "Output"],
Cell[BoxData[RowBox[{"2", "+", "2"}]], "Input"]}]