Michael,
I think you may have to put stringA into a concatenated expression in:
WebBrowser1.Document.parentWindow.execScript
"jmolScript(stringA)"
I haven't forgotten about this email chain. I'm just stumped. Here's where I am:
1) Jmol and Browser communicate freely in JavaScript.
2) VBA, my interest, can be made to write JavaScript text files locally.
3) VBA can also read files locally.
4) Here I'm stuck: If VBA could read/write to my server, then 1, 2, and 3 could
be connected.
Sadly, I cannot find a way around 4.
Otis
--
Otis Rothenberger
Department of Chemistry
Illinois State University
Normal, IL 61790-4160
http://chemagic.org
----------------------------------------
From: "Michael Marden" <[email protected]>
Sent: Tuesday, March 29, 2011 10:30 AM
To: [email protected]
Subject: Re: [Jmol-users] Continuing Saga of Jmol Talking to Public Databases
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
------------------------------------------------------------------------------
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