On Mon, Jun 3, 2013 at 2:27 PM, James Ryley <ja...@ryley.com> wrote:
> Where is the best place to go to figure out how to do this kind of (for me
> anyway) advanced scripting?
>
I'm familiar with the command documentation at
> http://chemapps.stolaf.edu/jmol/docs/.
>
Right here, for one thing, or that site.
> What I need guidance on is how one puts those commands together with
> Javascript so that simple things like string splitting (as you demonstrate
> below), regex's, and control structures are available. You example below
> seems to imply that I just write Javascript within a script file. Is that
> correct, that a script file can be a mixture of Jmol-specific commands and
> Javascript? So far I have been using Perl to generate script files which
> only contain Jmol commands because it isn't clear to me how/where one
> merges those commands with Javascript.
>
First question is whether this is a web site. Is that the goal? Or do you
see it as using the Jmol application? What you see there is not JavaScript.
It's JmolScript. Somewhat more tuned to molecular structure; very similar
structure. If you have a web page, you have the option of doing Jmol
scripting, JavaScript scripting, or some hybrid of those. If you are using
the application, it's JmolScript only.
People have done some very sophisticated things with Jmol scripting. It
certainly has just about everything that JavaScript has. Some of the string
handling is a bit cruder. No "regex" exactly. Or, at least, not as
efficiently.
Bob
--
Robert M. Hanson
Larson-Anderson Professor of Chemistry
Chair, Chemistry Department
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
------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users