Re: Launch notebook in FE and evaluate it immediately

*To*: mathgroup at smc.vnet.net*Subject*: [mg92395] Re: Launch notebook in FE and evaluate it immediately*From*: Albert Retey <awnl at gmx-topmail.de>*Date*: Tue, 30 Sep 2008 07:36:47 -0400 (EDT)*References*: <gbmpnr$i4e$1@smc.vnet.net>

Szabolcs Horv=E1t wrote: > Is there a way to launch the front end and instruct it to do something > *immediately*, without any user intervention? For example, evaluate a > notebook using the default kernel. > > Is there a way to do this, perhaps with a command line option? > > I know that this can be done with the kernel, but I would like to use > the Front End---more specifically I would like to diff two notebooks > using AuthorTools's NotebookDiff function. not sure which one would work best, but I see two possibilies: 1) start the kernel and let it launch the frontend. This is what e.g. webmathematica does, the functionality for that is documented as part of JLink. Search for UseFrontEnd and ConnectToFrontEnd for some information on how to do that. Unfortunatly the Documentation is not very exhaustive on these matters. 2) start the frontend within an environment which lets it read a special FrontEnd/init.m which would make it perform the task you want it to. You could start the FE with the environment variable MATHEMATICA_USERBASE set to a specific directory which contains the FrontEnd/init.m which is prepared to do what you want. I haven't tried any of the above, so despite the fact that I think both should work in principle I don't know how well each approach will work... hth, albert