Thanks Angel --  I have, but Jmol merely echos "null" or newline or
something to the screen.  I know it's echoing *something* because it paints
over text that is there from an earlier echo....if I give a javascript level
"alert" then I get the proper text in the pop-up window, but it's not going
to the Applet for some reason....

Here's what I'm doing (in part):

var headerInfo = jmolGetPropertyAsString("fileHeader");
var cutUp = headerInfo.split("\n");
var headerstring="";
for (l=0;l<cutUp.length;l++) {
     var regexp = new RegExp("TITLE.{5}(.*)\s*");
     var temp = cutUp[l];
     if (temp.search(regexp) == 0) {
         temp2 = RegExp.$1;
         temp2.replace(/^\s+|\s+$/g, "").replace(/\s+/g, " ");
headerstring += temp2;
}
}
headerstring.replace(/TITLE/, "");
alert(headerstring);
jmolScript("echo @headerstring");


-Tom
(It's meant to extract the TITLE lines from the PDB file header, remove the
TITLE at the beginning, remove all extra whitespace, and then echo that to
the Applet on loading a PDB file)

On Mon, Sep 22, 2008 at 11:10 AM, Angel Herráez <[EMAIL PROTECTED]>wrote:

> Tom, have you tried
> echo @variable
> ?
>
> That works for me in a simple test. But I'm not proficient with the use of
> braces.
>
>
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to