Prev: Problems with ChoiceDialog inside a Dynamic: Bug or not (well)
Next: Problems with ChoiceDialog inside a Dynamic: Bug or not (well) documented limitation?
From: Christoph Lhotka on 27 Feb 2010 03:16 hi, a combination of the functions NotebookSave and EvaluationNotebook should do the job. e.g., inside your code, something like: NotebookSave[EvaluationNotebook[],"dump.save.nb"] will save the notebook of evaluation into the file "dump.save.nb" whenever it is evaluated. chr Vince Virgilio wrote: > On Feb 25, 7:41 pm, Joe Hays <joeh...(a)vt.edu> wrote: > >> Hello all, >> >> How can I get a notebook to programmatically save itself at controlled >> locations? I don't want to use the NotebookAutoSave property because that >> saves the notebook everytime a cell produces an output. I want more control >> over when the notebook save itself. >> >> Ideas? >> > > For a periodic save, perhaps some combination of Dynamic and Clock > would do. > > In Doc Center, start here: > > ref/Clock > > Vince Virgilio > > > >
From: David Bailey on 3 Mar 2010 05:51
Joe Hays wrote: > Hello all, > > How can I get a notebook to programmatically save itself at controlled > locations? I don't want to use the NotebookAutoSave property because that > saves the notebook everytime a cell produces an output. I want more control > over when the notebook save itself. > > Ideas? > > Assuming your notebook is selected while it is executing (the usual case): NotebookSave[SelectedNotebook[]] However, I would be a bit cautious about doing this unless your notebook just invokes code from elsewhere. If I had a notebook containing a substantial amount of code, I'd want to be in charge when I saved it. Murphy's law says that if you automate the process, something will go wrong! David Bailey http://www.dbaileyconsultancy.co.uk |