I don't have version 5.2, and this type of animation no longer works properly in version 9, which is the oldest version I have installed. So what I show below is only an untested starting point for something more robust. I hope it will be helpful.
animate[frames_] := Module[{},
Scan[Show, frames];
SelectionMove[EvaluationNotebook[], Previous, CellGroup];
FrontEndTokenExecute["OpenCloseGroup"];
FrontEndTokenExecute["SelectionAnimate"]
]
frames
must be a list of graphics, e.g.
frames = Table[
Graphics[{Circle[{0, 0}, 1], Circle[{Cos[x], Sin[x]}, 1]},
PlotRange -> {{-2, 2}, {-2, 2}}, AspectRatio -> 1], {x, 0, 2 Pi, 2 Pi/20}];
animate[frames]
As I remember in v5.2 Show
caused the graphics to be rendered into a new cell, but I may be wrong ... in v6 and later this would be Print
, which I used to test this (sort of, my notebook display gets corrupted when I try it in v9/v10 ...)
Animate[g[ω], {ω, 1, 2}] SelectionMove[EvaluationNotebook[], All, GeneratedCell] SelectionAnimate[EvaluationNotebook[]]
$\endgroup$