Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #10231 > unrolled thread

Re: Question about SelectionMove

Started byJames Stein <mathgroup@stein.org>
First post2012-05-27 08:43 +0000
Last post2012-05-27 08:43 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Question about SelectionMove James Stein <mathgroup@stein.org> - 2012-05-27 08:43 +0000

#10231 — Re: Question about SelectionMove

FromJames Stein <mathgroup@stein.org>
Date2012-05-27 08:43 +0000
SubjectRe: Question about SelectionMove
Message-ID<jpspfs$hdg$1@smc.vnet.net>
Sorry, meant pair of steps (*2*) and (*3*)

On Sat, May 26, 2012 at 2:11 AM, James Stein <mathgroup@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!
>
>
>

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web