Hello Eric, I think that the "show file" command does what you expect.
From the documentation :
show FILE filepath

Delivers the entire contents of the specified file on the server from which the applet was loaded. The filename must be relative to the current page (not necessarily the directory containing the applet) and must be enclosed in quotation marks.

Paul

Le 12 janv. 08 à 04:55, Eric Martz a écrit :

Sometimes I wish that, from javascript in the browser, I could ask
the Jmol applet to let me (javascript) peek into the contents of a
Jmol command script (.spt) file, preferably before I execute it. Is
there some way to do this?

If not, do others think this would be useful?

I'm envisioning something like this:

     message file myscript.spt

Rather than executing the script, it would simply message the
contents of the .spt file. I could then parse the script and behave
accordingly.

This would be somewhat along the lines of "show pdbheader", which
messages the PDB file header to the javascript messageCallback function.

I am aware that the script file can set javascript variables using a
"javascript ..." script command. However, if the purpose of that is
to inform the browser that, for example, the script  plays a movie,
it requires an additional knowledgable effort on the part of the
script file author. If I could just preview the contents of the
script file looking for e.g. delay or moveTo commands, I could tell
whether there is movie in the script without troubling the author of
the script file for (redundant) information in another form.

-Eric
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to