Custom commands can be simply set up by defining a function with that
command name. is that what you mean -- sort of a macro?



function colorMeBlue(atoms) {

  color @atoms blue

}



colorMeBlue {helix}





2012/3/20 Adrià Cereto Massagué <adrian.cer...@urv.cat>

> Hello,
>
> I am new to Jmol, and I am developing an application which relies on it
> (the Integration.java example has been very useful)
>
> I want to have some custom commands available from the scripting console.
> Is there an easy way for doing so?
>
> I have tried extending AppConsole and overriding the enterPressed() method
> and checking AppConsole.text for the last line, but then I have no way no
> clear the custom command from the console unless i call
> super.enterPressed(), which prints a script error about (obviously) not
> recognizing the command.
>
> Thank you in  advance,
>
> Adrià
>
> --
> *Adrià Cereto Massagué*
> Ph.D Student
> Nutrigenomics Research Group
> Biochemistry and Biotechnology Department
> Building N4, Campus Sescelades
> Universitat Rovira i Virgili
> Tarragona, Catalonia
>
> Languages: Català, Español, English, Français, Deutsch, Português
>
> Nota importante<http://www.gnu.org/philosophy/no-word-attachments.es.html>| 
> Important
> Notice <http://www.gnu.org/philosophy/no-word-attachments.html>
>
> ------------------------------------------------------------------------------
> This SF email is sponsosred by:
> Try Windows Azure free for 90 days Click Here
> http://p.sf.net/sfu/sfd2d-msazure
> _______________________________________________
> Jmol-users mailing list
> Jmol-users@lists.sourceforge.net
> 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
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to