function main (script) ** For fun .. if scriptname is blank, then ** assume it is to be read from the file ** /tmp/zoom_control.txt if (scriptname = "") result = read ("/tmp/zoom_control.txt") scriptname = sublin(result,2) endif * Check if this is a script or display * string. RunScript = "ON" sparam = '' checkd = subwrd(script,1) scriptname = subwrd(script,1) sparam = subwrd(script,2) if (checkd = "d") RunScript = "OFF" varname = subwrd(script,2) endif * find the current time 'q dim' rec = sublin(result,5) currentt = subwrd(rec,9) * find the entire possible range of * time and use that for animation 'q ctlinfo' junk = 6 while (findtdf != "tdef") junk = junk + 1 rec = sublin(result, junk) findtdf = subwrd(rec, 1) endwhile endtime = subwrd(rec, 2) 'set t 1 ' endtime if (RunScript = "ON") '/usr/local/lib/grads/widget_xanim -pause -notitle -repeat 100 -startf 'currentt' -script ' scriptname ' -sparam ' sparam else '/usr/local/lib/grads/widget_xanim -pause -repeat 100 -startf 'currentt' ' varname endif ***'/usr/local/lib/grads/xanim -sec 1 -notitle -repeat 5 -script ' scriptname ** set the time to whatever it used to be ** What I really want is the current frame.. but ** not sure how to get it!! * find the current time *** Changed xanim.gs to not clean-up the time **** *'set t ' currentt * But do change back to contour .. which is what I usually use 'set gxout contour'