Right, Eric, so reading this again it seems to me you can certainly do 
it either way. It would be great if you gave the sync business a try. 
Really that is exactly what it is for, and it should be very interesting 
to see it work. What I set up is far more flexible than just 
synchronizing spinning. In fact it should do precisely what you are 
after. Just consider the first applet the controller, and do everything 
through it. Should work like a charm. It should be as simple as:

JmolScript('sync on;sync jmolAppletA slave;sync "the command here";sync 
jmolAppletA off;sync jmolAppletB slave;sync jmolAppletB "some other 
command";sync jmolAppletB off')

interestingly, it doesn't matter which applet gets this script -- any 
will do, because the sync command will send messages to the named 
applet, even if that applet is giving the command. The advantage, of 
course, is that this can be part of a Jmol script read from a .SPT file 
-- no JavaScript at all.

But there should also be nothing at all wrong with:

   jmolScript(script1, "0");
   jmolScript(script2, "1");


Bob




Eric Martz wrote:

>I am constructing web pages with 2 or 4 Jmol applets. I want a single 
>button to send **different** scripts to each Jmol, simultaneously. If 
>anyone has experience with this, examples, relevant jmol-users emails 
>to cite, or code to contribute, I'll appreciate your help. This 
>project is a Jmol Tutorial-Authoring Template, for tutorials similar 
>in structure to the one on hemoglobin at http://molviz.org and will 
>use a Creative Commons Attribution Noncommercial Share Alike license.
>
>I am aware of the "all" parameter in jmolScript(script, "all"); That 
>is useful when one wants to send the **same** script to all Jmols, 
>e.g. start or stop spinning.
>
>Unless another strategy is forthcoming, I intend to code a button 
>that will call a javascript function, that will send each script to 
>its appropriate Jmol, e.g.
>jmolsScripts(script1, script2)
>{
>   jmolScript(script1, "0");
>   jmolScript(script2, "1");
>}
>
>This seems straightforward, but I haven't done it yet, and one never 
>knows what issues will surface.
>
>I am aware of the recent jmol-users discussion (which I started) on 
>thread "Mouse synchronization between two or more Jmol applets" 
>(though I have not yet tested or tried the methods discussed). I do 
>plan to see if that can be implemented satisfactorily.
>
>Thanks, -Eric
>
>/* - - - - - - - - - - - - - - - - - - - - - - - - - - -
>Eric Martz, Professor Emeritus, Dept Microbiology
>U Mass, Amherst -- http://www.umass.edu/molvis/martz
>
>Biochem 3D Education Resources http://MolviZ.org
>See 3D Molecules, Install Nothing! - http://firstglance.jmol.org
>Protein Explorer - 3D Visualization: http://proteinexplorer.org
>Workshops: http://workshops.proteinexplorer.org
>World Index of Molecular Visualization Resources: http://molvisindex.org
>ConSurf - Find Conserved Patches in Proteins: http://consurf.tau.ac.il
>Atlas of Macromolecules: http://atlas.proteinexplorer.org
>PDB Lite Macromolecule Finder: http://pdblite.org
>Molecular Visualization EMail List (molvis-list):
>       http://bioinformatics.org/mailman/listinfo/molvis-list
>- - - - - - - - - - - - - - - - - - - - - - - - - - - */
>
>
>-------------------------------------------------------------------------
>This SF.net email is sponsored by: Splunk Inc.
>Still grepping through log files to find problems?  Stop.
>Now Search log events and configuration files using AJAX and a browser.
>Download your FREE copy of Splunk now >>  http://get.splunk.com/
>_______________________________________________
>Jmol-users mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/jmol-users
>  
>


-- 
Robert M. Hanson
Professor of Chemistry
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr


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



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to