Michael,
Thanks. I think my problem is that I'm trying to stay with VBA. I may need
expand my view to include VB.
Just out of curiosity, the following does not fly???
WebBrowser1.Document.parentWindow.execScript
"jmolScript('" & stringA & "')"
Otis
--
Otis Rothenberger
Department of Chemistry
Illinois State University
Normal, IL 61790-4160
http://chemagic.org
----------------------------------------
From: "Michael Marden" <michael.mar...@inserm.fr>
Sent: Wednesday, March 30, 2011 6:15 AM
To: jmol-users@lists.sourceforge.net
Subject: Re: [Jmol-users] Continuing Saga of Jmol Talking to Public
Databases
Otis,
I think you may have to put stringA into a concatenated expression
in: WebBrowser1.Document.parentWindow.execScript
"jmolScript(stringA)"
sometimes these problems are simply getting the right format, but no
luck yet
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.
1-3 sounds like my current method that Bob set up. The JavaScript
automatically loads local files (which contain the new Jmol
commands). that won't work for you ?
concerning point 4, my VB program constructs a URL and the Browser
can load any valid page.
My database is local, but contains enough information for various
standard websites. for example, the user selects a specific species
or mutant of globin, and I can then display a web page info such as
the sequence source, images, phylogeny, etc.
I have not yet tried to extract data and work on it. If your
server can be accessed by a valid file or URL, then you should be
able to load pages (and therfore info) from it.
Michael
--
Otis Rothenberger
Department of Chemistry
Illinois State University
Normal, IL 61790-4160
http://chemagic.org
From: "Michael Marden"
<michael.mar...@inserm.fr>
Sent: Tuesday, March 29, 2011 10:30 AM
To: jmol-users@lists.sourceforge.net
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
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users
------------------------------------------------------------------------------
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
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users