There is option to evaluate the complete notebook but I wanted to know if its possible to evaluate notebook from some desired cell to end or some other desired cell following?
Answer
Does this work as you wish?
CreatePalette@Button["Evaluate down",
With[{nb = InputNotebook[]},
SelectionMove[nb, Previous, Cell];
With[{prevCell = SelectedCells[nb] /. {c_} :> c},
Function[cell,
SelectionMove[cell, All, Cell];
SelectionEvaluateCreateCell@nb
]~Scan~
Intersection[
Reverse@TakeWhile[Reverse@Cells[nb], # =!= prevCell &],
Cells[nb, CellStyle -> "Input"]]]
]
]
Comments
Post a Comment