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 not yet found a way to "read" information directly.
At present, my only 2-way communication with variables from VB is via
the Html page elements.
As we discussed there could be a problem with the stability of such
code, as the index number might change.But it seems that this would not
be a problem if unique IDs are provided, or if the page set-up is
supplied (not to be changed by the user).
Currently, Jmol can be piloted using a string variable to the command
input line:
WebBrowser1.Document.All("jmolCmd0").Value = "load heme.pdb"
WebBrowser1.Document.All(12).Click
Note: this employs jmolCommandInput; my page shows the text line with
index 11, button with index 12. The page element can be accessed using
an ID or index. Currently the associated button does not have an ID, but
I assume that its index is simply the jmolCmd0 index (=11) plus 1.
Now to retrieve any information from Jmol,some type of OUTPUT page
element is required. If Jmol could output (or echo or return) strings to
a page text element with unique ID, then we would have 2-way communication.
So, is this "HTML" method feasible?, or should I continue on the pathway
to "Script" ?
Michael
On 26/03/2011 17:10, Robert Hanson wrote:
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, <[email protected]
<mailto:[email protected]>> wrote:
Progress ; thanks Bob and Angel
However, VB will does not like anything of the type
x = WebBrowser3.Document.xxxxx etc
So for functions that return something, we need to know how to
retrieve the answer.
read this:
http://bytes.com/topic/c-sharp/answers/609601-how-catch-click-webbrowser
I'm very interested to find out if that works.
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