I'm not seeing what you are doing there exactly. First, I would recommend
putting that code in a function and then setting the callback to run the
function:

function framecallback()
  set echo top left;
  if(_lastframe == _modelnumber);
        echo active;
   endif;
   if(_firstframe == _modelnumber);
        echo inactive;
   endif;
end function

set animFrameCallback "jmolscript:framecallback"


I'm not sure why you would want those set animFrameCallback settings in
there. This script works for me. It switches between "active" and "inactive"
at the two ends of an animation.

Bob

On Tue, May 5, 2009 at 12:59 PM, Annika Kreuchwig <[email protected]>wrote:

>  Hi,
>
>
>
> I am trying to add an echo at the last and the first frame of an animation
> in jmol.
>
>
>
> I used this to display the different frames, this works:
>
>
>
>
>
> set echo top left
>
> echo  This is model %{_modelNumber}
>
>
>
> I also tried this solution with an if statement to change the output, but
> it didn’t change anything:
>
> set animFrameCallback "jmolscript:)
>
> set echo top left;
>
> if(_lastframe == _modelnumber);
>
>         echo active;
>
>         set animFrameCallback "jmolScript:";
>
> endif;
>
>
>
> if(_firstframe == _modelnumber);
>
>         echo inactive;
>
>         set animFrameCallback "jmolScript:";
>
> endif;
>
>
>
> What am I doing wrong?
>
>
>
> Thanks for your help!
>
>
>
> AK
>
>
>
>
> ------------------------------------------------------------------------------
> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
> production scanning environment may not be a perfect world - but thanks to
> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK
> i700
> Series Scanner you'll get full speed at 300 dpi even with all image
> processing features enabled. http://p.sf.net/sfu/kodak-com
> _______________________________________________
> Jmol-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>
>


-- 
Robert M. Hanson
Professor of Chemistry
St. Olaf College
1520 St. Olaf Ave.
Northfield, MN 55057
http://www.stolaf.edu/people/hansonr
phone: 507-786-3107


If nature does not answer first what we want,
it is better to take what answer we get.

-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to