In the initial query, Ira asks for x,y coordinates. Is that right? You want screen coordinates? If so, you need to use Jmol 11.9 and use the new clickCallback
It should report all clicks of the mouse. See the example at http://chemapps.stolaf.edu/jmol/docs/examples-11/new.htm?topic=2 If you combine clickCallback with pickCallback, the clickCallback is reported just before the pickCallback, so just save the x,y coordinates from the click and use them in the pickCallback function. I find it just as easy to set up the callbacks within script. So, for example, you can use: jmolApplet([500,500],"set pickCallback 'myPickCallback';set clickCallback 'myClickCallback';load ... whatever...") then in JavaScript: var mousex = 0 var mousey = 0 function myClickCallback(app, x, y, modifiers, clickCount, Modifiers) { mousex = x mousey = y } function myPickCallback(app, descriptor, atomIndex) { .... } Bob On Thu, Sep 10, 2009 at 4:52 AM, I B <[email protected]> wrote: > OK > Thanks > > 2009/9/10 Angel Herráez <[email protected]> >> >> The details are explained in the Jmol.js documentation, in the link I >> posted before. >> >> If you think that explanation can be improved, please say so. >> >> >> >> ------------------------------------------------------------------------------ >> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 >> 30-Day >> trial. Simplify your report design, integration and deployment - and focus >> on >> what you do best, core application coding. Discover what's new with >> Crystal Reports now. http://p.sf.net/sfu/bobj-july >> _______________________________________________ >> Jmol-developers mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/jmol-developers > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Jmol-developers mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/jmol-developers > > -- 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 ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Jmol-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jmol-developers
