Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1997

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: How to close down the front end from a 3.0 notebook ?

  • To: mathgroup at
  • Subject: [mg7686] Re: How to close down the front end from a 3.0 notebook ?
  • From: Dick Zacher <dick at>
  • Date: Sun, 29 Jun 1997 22:17:21 -0400 (EDT)
  • Organization: Tandem Computers
  • Sender: owner-wri-mathgroup at

Risto Karjalainen wrote:
> Here's the problem: I need to save my work and close the front end from
> within a notebook. Strictly speaking, closing down the front end is not
> essential. What I need to do is to save my notebook, close down the kernel,
> and close the notebook, all using kernel or front end commands in the
> notebook (i.e. with no keyboard input). Is there a way to do this in
> version 3.0 ?
> ...
> Basically, my notebook looks as follows...
>         ... lots of stuff deleted ...
>         NotebookSave[SelectedNotebook[]];
>         Exit[];
>         NotebookClose[SelectedNotebook[]];
> Of course, the problem is that once you do Exit[], there is no kernel left
> to do NotebookClose. 
> ...

I was able to do this successfully with the code


I think the front end sends the entire expression to the kernel before
evaluation is done, so once it is all sent to the kernel, there is no
more need for the notebook, and the Exit[] gets executed.

Dick Zacher                    
Performance Engineering Dept., Tandem Computers
zacher_dick at     phone: 408-285-5746     fax:   408-285-7079

  • Prev by Date: Re: Replace expressions
  • Next by Date: Re: using indexed variables in MultiplierMethod[ ], etc.
  • Previous by thread: problem of notebook in 16bit X server
  • Next by thread: Re: using indexed variables in MultiplierMethod[ ], etc.