the script() command does not do quite what you think it does. It expects a script command:

x = script("show chemical name")
x = script("show measurements")
x = script("script '../scripts/script1.spt' ")

It is true that simply named scripts like you have there work, but only because there is a short-cut for the script command. (I got tired of typing it so often :).

x = script("script1.spt ")

is really

x = script("script 'script1.spt' ")

but  that only works with very simple names like that, not ones with directories.


On Wed, Jan 29, 2014 at 4:25 PM, Whitwell, George <> wrote:



I'm using the output of a script() function to gather data to be output as a file.  I can run the script from another folder as


    script ../Jmolspts/writeout.spt


without difficulty.  When I direct the output to a variable, I'm finding that the target must be in the current directory.  That is,


    gmstring = script("../Jmolspts/writeout.spt")


returns a blank, while


    gmstring = script("writeout.spt")


works as I intend with the results now loaded into the variable.  What's going on here?



George Whitwell

WatchGuard Dimension instantly turns raw network data into actionable
security intelligence. It gives you real-time visual feedback on key
security issues and trends.  Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
Jmol-users mailing list

Robert M. Hanson
Larson-Anderson Professor of Chemistry
St. Olaf College
Northfield, MN

If nature does not answer first what we want,
it is better to take what answer we get.

-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900