< If[nmode < 10, "0", ""] <> ToString[nmode] <> ".gif"; Do[ t = 2 Pi nt/mt; plt = Show[molec[t], PlotRange -> 1.5{{xmin, xmax}, {ymin, ymax}, {zmin, zmax}}, ViewPoint -> {rxy Cos[phi], rxy Sin[phi], 2.}, Boxed -> False, PlotRegion -> {{-off, 1 + off}, {-off, 1 + off}}, ImageSize -> size{1/rat, 1}, DisplayFunction -> If[disp === 0, Identity, $DisplayFunction]]; pictfile = ToString[nt] <> ".tif"; fnames = fnames <> pictfile <> " "; Display[pictfile, plt, "TIFF"]; , {nt, mt}]; os = OpenWrite[batchfile, PageWidth -> Infinity, FormatType -> OutputForm]; Write[os, "D:\\programs\\ImageMagick-5.1.1\\convert -adjoin -loop 4096 -delay " <> ToString[delay100] <> fnames <> animfile]; Close[os]; Run[batchfile]; , {nmode, nmodes}];