Re: [Jmol-users] Continuing Saga of Jmol Talking to Public Databases

2011-04-05 Thread Robert Hanson
VERY good! comments below On Tue, Apr 5, 2011 at 8:41 AM, Michael Marden wrote: > Progress on piloting Jmol from Visual Basic (VB)via WebBrowser > Considering the framework: > VB - HTML elements - Jmol functions > > I switched to VB.NET for further testing, as that is the modern system, > an

Re: [Jmol-users] Continuing Saga of Jmol Talking to Public Databases

2011-04-05 Thread Michael Marden
Progress on piloting Jmol from Visual Basic (VB)via WebBrowser Considering the framework: VB - HTML elements - Jmol functions I switched to VB.NET for further testing, as that is the modern system, and the few fragments of information concerning data retrieval were relative to the NET system.

Re: [Jmol-users] Continuing Saga of Jmol Talking to Public Databases

2011-03-31 Thread Michael Marden
Great, that works ; in fact all 3 formats work. thanks Otis and Bob I'll try the Callback asap. Apparently 2-way communication does work, see also: http://msdn.microsoft.com/en-us/library/a0746166.aspx I'm not sure yet if VB6 can do it. I am working on VB.NET in parallel more later, Michael

Re: [Jmol-users] Continuing Saga of Jmol Talking to Public Databases

2011-03-30 Thread Robert Hanson
OK, Michael, I'd say that is "two steps forward, one back." The command is: WebBrowser1.Document.parentWindow.execScript "jmolScript(' " + stringA + " ')" But careful with those quotes. I've inserted double quotes to make it work, but I would recommend instead: stringA = “'load heme.pdb'” Becau

Re: [Jmol-users] Continuing Saga of Jmol Talking to Public Databases

2011-03-30 Thread Otis Rothenberger
of Chemistry Illinois State University Normal, IL 61790-4160 http://chemagic.org From: "Michael Marden" Sent: Tuesday, March 29, 2011 10:30 AM To: jmol-users@lists.sourceforge.net Subject: Re: [Jmol-users] Continuing Saga of Jmol

Re: [Jmol-users] Continuing Saga of Jmol Talking to Public Databases

2011-03-30 Thread Michael Marden
Michael -- Otis Rothenberger Department of Chemistry Illinois State University Normal, IL 61790-4160 http://chemagic.org *From*: "Michael Marden" *Sent*: Tuesday, March 29, 2011 10:30 AM *To*: jmol-users@lists.sourceforge.net *Subject*: Re: [Jmol-users] Continuing Saga of Jmol Talk

Re: [Jmol-users] Continuing Saga of Jmol Talking to Public Databases

2011-03-29 Thread Otis Rothenberger
artment of Chemistry Illinois State University Normal, IL 61790-4160 http://chemagic.org From: "Michael Marden" Sent: Tuesday, March 29, 2011 10:30 AM To: jmol-users@lists.sourceforge.net Subject: Re: [Jmol-users] Continuing Saga of Jmol Tal

Re: [Jmol-users] Continuing Saga of Jmol Talking to Public Databases

2011-03-29 Thread Michael Marden
One step back, I do not see how to send a variable from VB to the applet: This works: WebBrowser1.Document.parentWindow.execScript "jmolScript('load heme.pdb')" This does not (as variable): stringA = "load heme.pdb" WebBrowser1.Document.parentWindow.execScript "jmolScript(stringA)" Also, I have

Re: [Jmol-users] Continuing Saga of Jmol Talking to Public Databases

2011-03-26 Thread Robert Hanson
To be specifc, I think this will work: JavaScript... function myWhateverCallback(appID,a,b,c,d,e,f) { window.external.vbCallback(appID,a,b,c,d,e,f); } You might have to be careful to match the number of arguments in that. Look for errors in the browser error console -- oh, this is MSIE... ah,

Re: [Jmol-users] Continuing Saga of Jmol Talking to Public Databases

2011-03-26 Thread Robert Hanson
There you go! Much better. So WebBrowser3.Document.parentWindow.execScript "alert(jmolScript)" should just show you the function, just as it did there. On Sat, Mar 26, 2011 at 8:44 AM, wrote: > Progress ; thanks Bob and Angel > > However, VB will does not like anything of the type > x = We

Re: [Jmol-users] Continuing Saga of Jmol Talking to Public Databases

2011-03-26 Thread Angel Herráez
Michael, I have no experience with VB, but regarding Javascript calls to Jmol, all support is in the Jmol.js library, and it supports html IDs for both applets and controls. Maybe that's what you need. > That immediately leads to the question of how to obtain a list of available > functions

Re: [Jmol-users] Continuing Saga of Jmol Talking to Public Databases

2011-03-26 Thread Michael Marden
Ok, I'll look into the i/o via JavaScript functions. That immediately leads to the question of how to obtain a list of available functions and their parameters/formats, etc. VB - WebBrowser - Page elements - JS functions - Jmol commands ? I'm a bit fuzzy on the line of events (and exact format

Re: [Jmol-users] Continuing Saga of Jmol Talking to Public Databases

2011-03-25 Thread Robert Hanson
Michael, my reading of that discussion is that you have access to all the normal objects and functions on the page, just like normal HTML in a browser. So there should be no need to futz with other objects. You just have to experiment a bit and see what you can find. This page uses Jmol.js, right?

Re: [Jmol-users] Continuing Saga of Jmol Talking to Public Databases

2011-03-25 Thread Michael Marden
Ok, I'll look into the i/o via JavaScript functions. That immediately leads to the question of how to obtain a list of available functions and their parameters/formats, etc. VB - WebBrowser - Page elements - JS functions - Jmol commands ? I'm a bit fuzzy on the line of events (and exact format

Re: [Jmol-users] Continuing Saga of Jmol Talking to Public Databases

2011-03-23 Thread Robert Hanson
Ah, interesting. What you really need to do is explore whether you can use JavaScript functions on that page and call them from Visual Basic. Here's a link to a possibility: http://groups.google.com/group/microsoft.public.vb.general.discussion/browse_thread/thread/7c81a612b9fd026e Looks like: We

Re: [Jmol-users] Continuing Saga of Jmol Talking to Public Databases

2011-03-23 Thread Michael Marden
On 15/03/2011 20:35, Robert Hanson wrote: Hi, Michael. It's been to long for me to remember what the problems were in direct communication with the browser window from VB. Hello Bob and others, here is a a progress report on 2 way direct communication. First a reminder that I'm programming in

Re: [Jmol-users] Continuing Saga of Jmol Talking to Public Databases

2011-03-18 Thread Robert Hanson
sorry -- crossed threads. Sure, from the app, you should be able to just do something like this: load $someChemicalName like load $cholesterol or a SMILES string: load $CCC(C)CCO On Fri, Mar 18, 2011 at 11:38 AM, Charles Harrison Shubert wrote: > Hi Bob, > > Is there a way I can access th

Re: [Jmol-users] Continuing Saga of Jmol Talking to Public Databases

2011-03-18 Thread Robert Hanson
You can get all the callbacks to your app. Is that what you mean? On Fri, Mar 18, 2011 at 11:38 AM, Charles Harrison Shubert wrote: > Hi Bob, > > Is there a way I can access this type of JavaScript functionality from my > Java app that embeds Jmol and talks to it through the JmolViewer? > > Jmol

Re: [Jmol-users] Continuing Saga of Jmol Talking to Public Databases

2011-03-18 Thread Charles Harrison Shubert
Hi Bob, Is there a way I can access this type of JavaScript functionality from my Java app that embeds Jmol and talks to it through the JmolViewer? JmolViewer jmolViewer = JmolViewer.allocateViewer(this, new SmarterJmolAdapter(), null, null, null, null, null); Thanks, --Chuck On Mar 15, 2011

Re: [Jmol-users] Continuing Saga of Jmol Talking to Public Databases

2011-03-15 Thread Otis Rothenberger
emagic.org From: "Robert Hanson" Sent: Tuesday, March 15, 2011 3:54 PM To: osrot...@chemagic.com, jmol-users@lists.sourceforge.net Subject: Re: [Jmol-users] Continuing Saga of Jmol Talking to Public Databases So, Otis, what I am wondering about is whether you w

Re: [Jmol-users] Continuing Saga of Jmol Talking to Public Databases

2011-03-15 Thread Robert Hanson
So, Otis, what I am wondering about is whether you would allow us to add jmolLoadAjax_STOLAF_NIH to Jmol.js. It would allow any applet (or knowledgeable user on any applet's page) to load any of the NIH models into Jmol directly, without need for the signed applet. You can try this yourself for t

Re: [Jmol-users] Continuing Saga of Jmol Talking to Public Databases

2011-03-15 Thread Robert Hanson
Hi, Michael. It's been to long for me to remember what the problems were in direct communication with the browser window from VB. -- 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 natur

Re: [Jmol-users] Continuing Saga of Jmol Talking to Public Databases

2011-03-15 Thread Robert Hanson
nal file-directory restrictions for reading files, but not writing. It's just a file dialog that pops up. > > > *From*: "Robert Hanson" > *Sent*: Tuesday, March 15, 2011 7:30 AM > *To*: osrot...@chemagic.com, jmol-users@lists.sourceforge.net > > *S

Re: [Jmol-users] Continuing Saga of Jmol Talking to Public Databases

2011-03-15 Thread Otis Rothenberger
...@chemagic.com, jmol-users@lists.sourceforge.net Subject: Re: [Jmol-users] Continuing Saga of Jmol Talking to Public Databases Speaking of public databases, this might be a time to test the facility that has been in Jmol for quite some time -- the ability of the UNSIGNED applet to access remote file

Re: [Jmol-users] Continuing Saga of Jmol Talking to Public Databases

2011-03-15 Thread Michael Marden
erger Department of Chemistry Illinois State University Normal, IL 61790-4160 http://chemagic.org *From*: "Michael Marden" *Sent*: Tuesday, March 15, 2011 11:05 AM *To*: jmol-users@lists.sourceforge.net *Subject*: Re:

Re: [Jmol-users] Continuing Saga of Jmol Talking to Public Databases

2011-03-15 Thread Otis Rothenberger
From: "Michael Marden" Sent: Tuesday, March 15, 2011 11:05 AM To: jmol-users@lists.sourceforge.net Subject: Re: [Jmol-users] Continuing Saga of Jmol Talking to Public Databases Two items concerning communication with Jmol caught my attention. this one

Re: [Jmol-users] Continuing Saga of Jmol Talking to Public Databases

2011-03-15 Thread Michael Marden
Two items concerning communication with Jmol caught my attention. this one (Continuing Saga of Jmol Talking to Public Databases) and "Command line communication with the Jmolapplication?" I'm not sure if it is really relevant to the method that I'm using. I'm using visual basic (VB) as a fron

Re: [Jmol-users] Continuing Saga of Jmol Talking to Public Databases

2011-03-15 Thread Robert Hanson
Speaking of public databases, this might be a time to test the facility that has been in Jmol for quite some time -- the ability of the UNSIGNED applet to access remote files via a JavaScript interface. I don't think anyone has capitalized on this, but there is a St. Olaf server that is built into