Re: [Jmol-users] Use of variable in a call to getProperty

2016-07-08 Thread Kubasik, Matthew A.
How about here? http://wiki.jmol.org/index.php/Scripting/GetProperty On Jul 8, 2016, at 11:46 AM, Angel Herráez mailto:angel.herr...@uah.es>> wrote: Sure! The question is... where to locate it? Goes to the to-do list. Suggestions or actual page edition are welcome

Re: [Jmol-users] Use of variable in a call to getProperty

2016-07-08 Thread Angel Herráez
Sure! The question is... where to locate it? Goes to the to-do list. Suggestions or actual page edition are welcome On 8 Jul 2016 at 9:59, Robert Hanson wrote: Might be a nice addition to the Wiki. -- Attend Shape: A

Re: [Jmol-users] Use of variable in a call to getProperty

2016-07-08 Thread Robert Hanson
Might be a nice addition to the Wiki. On Fri, Jul 8, 2016 at 9:16 AM, Latévi Max LAWSON DAKU wrote: > Dear Bob, > > Thanks a lot for your answer. > > Your solution is also the one given by Matt and it works :) > > > I'm attaching a README file, which I wrote to keep track of what I did. > It's f

Re: [Jmol-users] Use of variable in a call to getProperty

2016-07-08 Thread Latévi Max LAWSON DAKU
Dear Bob, Thanks a lot for your answer. Your solution is also the one given by Matt and it works :) I'm attaching a README file, which I wrote to keep track of what I did. It's far from being perfect. But I hope it may be helpful to someone. Thanks again, Bob, Matt and Angel! Best, Max

Re: [Jmol-users] Use of variable in a call to getProperty

2016-07-07 Thread Robert Hanson
My message came out somewhat garbled, I think. Trying again: i = 7 print getproperty('modelInfo.models['+i+'].modelProperties.FreqValue') -- Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San Francisc

Re: [Jmol-users] Use of variable in a call to getProperty

2016-07-07 Thread Robert Hanson
On Thu, Jul 7, 2016 at 9:38 AM, Latévi Max LAWSON DAKU wrote: > Dear Jmol users/developers, > > I would like to be able to use a variable in a call to getProperty. > So far, the following command works. > > $ print getproperty('modelInfo.models[7].modelProperties.FreqValue') > 129.52935

Re: [Jmol-users] Use of variable in a call to getProperty

2016-07-07 Thread Kubasik, Matthew A.
_ From: Herráez Sánchez Ángel [angel.herr...@uah.es] Sent: Thursday, July 07, 2016 11:50 AM To: jmol-users@lists.sourceforge.net Subject: Re: [Jmol-users] Use of variable in a call to getProperty Yes, Matt it will be corrrect and safe. Jmol scripting does not care about variable

Re: [Jmol-users] Use of variable in a call to getProperty

2016-07-07 Thread Herráez Sánchez Ángel
Yes, Matt it will be corrrect and safe. Jmol scripting does not care about variable types, as far as I know You are right this is a string issue and concatenation is the right approach.

Re: [Jmol-users] Use of variable in a call to getProperty

2016-07-07 Thread Kubasik, Matthew A.
ertain the syntax is strictly correct. Best, Matt From: Latévi Max LAWSON DAKU [max.law...@unige.ch] Sent: Thursday, July 07, 2016 11:15 AM To: jmol-users@lists.sourceforge.net Subject: Re: [Jmol-users] Use of variable in a call to getProperty On 07. 07

Re: [Jmol-users] Use of variable in a call to getProperty

2016-07-07 Thread Latévi Max LAWSON DAKU
e > clunky lines! > > Matt > > > > > > From: Latévi Max LAWSON DAKU [max.law...@unige.ch] > Sent: Thursday, July 07, 2016 10:38 AM > To: jmol-users@lists.sourceforge.net > Subject: [Jmol-users] Use of variable in a ca

Re: [Jmol-users] Use of variable in a call to getProperty

2016-07-07 Thread Latévi Max LAWSON DAKU
On 07. 07. 16 17:04, Herráez Sánchez Ángel wrote: > Hi Max > Hi Herráez, Thanks for your mail > > I also have trouble often using variables. > > @{i} is unusual to me. The common syntax is either "i" or "@i " > :) I'm never sure when to use this; if using the bare name 'i' doesn't work, i swi

Re: [Jmol-users] Use of variable in a call to getProperty

2016-07-07 Thread Herráez Sánchez Ángel
Hi Max I also have trouble often using variables. @{i} is unusual to me. The common syntax is either "i" or "@i " Have you tried ...? print getproperty('modelInfo.models[@i].modelProperties.FreqValue') ---

Re: [Jmol-users] Use of variable in a call to getProperty

2016-07-07 Thread Kubasik, Matthew A.
he list could suggest improvements to these clunky lines! Matt From: Latévi Max LAWSON DAKU [max.law...@unige.ch] Sent: Thursday, July 07, 2016 10:38 AM To: jmol-users@lists.sourceforge.net Subject: [Jmol-users] Use of variable in a call to getProperty

[Jmol-users] Use of variable in a call to getProperty

2016-07-07 Thread Latévi Max LAWSON DAKU
Dear Jmol users/developers, I would like to be able to use a variable in a call to getProperty. So far, the following command works. $ print getproperty('modelInfo.models[7].modelProperties.FreqValue') 129.529358 But I rwould like to use a variable as follows $ i=7 $ print g