MathGroup Archive 2012

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

Search the Archive

Re: Question about SelectionMove

  • To: mathgroup at smc.vnet.net
  • Subject: [mg126633] Re: Question about SelectionMove
  • From: James Stein <mathgroup at stein.org>
  • Date: Sun, 27 May 2012 04:42:16 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <201205260911.FAA07093@smc.vnet.net>

Sorry, meant pair of steps (*2*) and (*3*)

On Sat, May 26, 2012 at 2:11 AM, James Stein <mathgroup at stein.org> wrote:

>
> I would like to programmatically evaluate all cells in a Notebook except
> those in the last CellGroup. Assuming the Notebook is open and has name
> "foo", this code should work:
>   (*1*) nb=Notebooks["foo"]//First;
>   (*2*) SelectionMove[nb,All,Notebook];
>   (*3*) UnselectLastCellGroup[nb];
>   (*4*) SelectionEvaluate[nb];
> Unfortunately, 'UnselectLastCellGroup' is pseudo code; I do not know how to
> implement it although it seems like the pair of steps (*1*) and (*2*) ought
> to be functionally equivalent to some sequence of calls to SelectionMove.
>
> Some related questions:
> 1. Given a NotebookObject nb, how to determine how many cells it contains?
> 2. Is a CellGroup also a cell? (I am contemplating stepping through a
> notebook cell by cell.)
>
> Any and all advice appreciated!
>
>
>



  • Prev by Date: Button operation that indicates start and finish of simulation
  • Next by Date: Re: Restricting Data from Wolfram|Alpha Input into Mathematica
  • Previous by thread: Question about SelectionMove
  • Next by thread: Re: LaTeX and the ConversionRules option