Of course, this makes perfect sense. I had noted that a quoted script with
directories works while without quotes, it doesn't. Your explanation hadn't
occurred to me.
Thanks for improving my understanding of this.
George
From: Robert Hanson [mailto:hans...@stolaf.edu]
Sent: Thursday, January 30, 2014 11:32 PM
To: jmol-users@lists.sourceforge.net
Subject: Re: [Jmol-users] script() function path question
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.
Bob
On Wed, Jan 29, 2014 at 4:25 PM, Whitwell, George
<gwhitw...@ncwc.edu<mailto:gwhitw...@ncwc.edu>> wrote:
Hi,
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?
Thanks,
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.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net<mailto:Jmol-users@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/jmol-users
--
Robert M. Hanson
Larson-Anderson Professor of Chemistry
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr
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
------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users