Rick, this Jmol script is being run when? When there is a frame change? 
How are you setting it up to run these statements?

In the latest version of Jmol you can designate a Jmol script to be run 
from an animation frame callback:

   set animFrameCallback "script:if(_modelNumber = 1);.........."

thus avoiding all JavaScript entirely, but I don't think that's what you 
are doing, right?

Bob


rspinney wrote:

>I am trying to use the if statement to run scripts during an animation
>(using version 11.1.36) using the following script (where the messages are
>directed to a textbox using the jmolsetcallback function, I want to change
>the message based on the model number):
>
>if (_modelNumber = 1); message (This is an E1 reaction); 
>endif; 
>if (_modelNumber = 10); script SCRIPTS/sub1.txt; 
>endif;
> 
>The first if statement executes correctly, but the second one never
>executes, although it will run correctly using the console. To test this I
>added:
>
>set echo top right; color echo red; echo "This is model %{_modelNumber}";
>
>which works, displaying the correct model number as the animation proceeds.
>But for the if statement it is like the _modelnumber is never updated when
>the animation is running. Is this a bug? Is there a better way to do this?
>
>Help!
>
>Thanks, Rick
>
>--------------------------------------
>Dr. Richard Spinney
>The Ohio State University
>Department of Chemistry
>160 B Celeste Laboratory
>120 West 18th Ave
>Columbus, Ohio 43210
> 
>email: [EMAIL PROTECTED]
> 
>Phone: (614) 247 - 6847
>Fax: 614 - 292 - 1685
>
>
>
>-------------------------------------------------------------------------
>This SF.net email is sponsored by DB2 Express
>Download DB2 Express C - the FREE version of DB2 express and take
>control of your XML. No limits. Just data. Click to get it now.
>http://sourceforge.net/powerbar/db2/
>_______________________________________________
>Jmol-users mailing list
>Jmol-users@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/jmol-users
>  
>


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to