On Fri, Mar 25, 2011 at 12:12 AM, Yingjie Lin <[email protected]> wrote:

> Hi Angel and Bob,
>
> >> I think the example might be a bit confusing for newbies like me :)
> >
> > Why do you think so? It says clearly that "a" must be a Jmol variable.
> > I don't see where your "myvariable" comes from. Javascript?
>
> I am sorry. I take it back.
> You are right. What's in the documentation is correct.
>
> Here's a summary of what I was confused about:
> 1. jmolEvaluate("a")
>

as long as you have created the variable  a  in Jmol,  that's right.

2. jmolEvaluate("print a")
>

nope, can't do that, because you also can't do this:

print print a


> 3. jmolEvaluate("script('print a')")
>

ok


> 4. jmolEvaluate("script('a')")
>

can't do that, because   a  is not a script command.


> "a" is a variable I defined in jmolScript. 1 and 3 work, while 2 and 4 do
> not.
>
>
exactly. Takes some getting used to.



> Thanks!
>
> Yingjie
>
> >
> >
> > ------------------------------
> >
> > Message: 3
> > Date: Thu, 24 Mar 2011 17:04:01 -0500
> > From: Robert Hanson <[email protected]>
> > Subject: Re: [Jmol-users] jmolEvaluate problem
> > To: [email protected]
> > Message-ID:
> >       <[email protected]>
> > Content-Type: text/plain; charset="iso-8859-1"
> >
> > Actually, what you have there will not work, and what is in the
> > documentation is correct. I think part of the confusion relates to what
> sort
> > of variable "myvariable" is -- presumably this is a JmolScript variable,
> > right? Then you want
> >
> > jmolEvaluate("myvariable")
> >
> > just like you would use
> >
> > print myvariable
> >
> > If myvariable is a JavaScript variable, then you need to do it some other
> > way.
> >
> > Bob
> >
>
>
>
> ------------------------------------------------------------------------------
> Enable your software for Intel(R) Active Management Technology to meet the
> growing manageability and security demands of your customers. Businesses
> are taking advantage of Intel(R) vPro (TM) technology - will your software
> be a part of the solution? Download the Intel(R) Manageability Checker
> today! http://p.sf.net/sfu/intel-dev2devmar
> _______________________________________________
> 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
------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to