Mathematica online: How to evaluate initialization cells (only)
FrontEndToken
solution won't work because it is not implemented yet.
You could filter InitializationCell
from Cells[]
, then scan them with SelectionMove+SelectionEvaluate
. Unfortunately it seems you can select CellContents
but not Cell
so SelectionEvaluate
won't work...
Assuming you don't need them to generate output you could do:
ToExpression @* First @* NotebookRead /@ Select[CurrentValue[#,InitializationCell]&] @ Cells[];