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

On Thu, Mar 24, 2011 at 1:34 PM, Yingjie Lin <[email protected]> wrote:

> Hi Robert, Oliver and Angel,
>
> With your help, I finally see the problem in my script. It should be
> jmolEvaluate("script('myvariable')") instead of just
> jmolEvaluate("myvariable")
>
> Below is an example of usage I found on
> http://jmol.sourceforge.net/jslibrary/#jmolEvaluate
>        alert( jmolEvaluate("a") );
>        // Displays the value of the 'a' variable if set in Jmol script.
>
> I think the example might be a bit confusing for newbies like me :)
>
> Thanks a lot for your help!
>
> Yingjie
>
>
>
> ------------------------------------------------------------------------------
> 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