Thanks, unfortunately, even after leaving the variables in the function 
definition I haven't received any result. This is a screenshot of my 
console, just in case I made an error in copy-pasting the code.

On 15/10/2014 7:25 PM, Rolf Huehne wrote:
> On 10/15/2014 10:55 AM, Brenton Horne wrote:
>> Hi, Rolf
>>
>> I've tried to implement this code as
>>
>>      function exportAnimation(jmol_movie, 500, 500, 180, "rotate
>>      axisangle {1 1 0} 2")
>>
>>      {
>>          var printFormat = "" + jmol_movie + "_%0" + stepCount.length +
>>      "d.png";
>>          var savedBackgroundColor = backgroundColor;
>>          background [x101010];
>>          for (var i=1; i<=stepCount; i++) {
>>            var filename = format(printFormat, i);
>>            var writeCommand = "write IMAGE " + 500 + " " + 500 + " PNGT 9
>>      " + jmol_movie;
>>            var dummy = script(writeCommand);
>>            dummy     = script("rotate axisangle {1 1 0} 2");
>>          }
>>          background @savedBackgroundColor;
>>      }
>>
>> And I got this error:
>>
>>      script compiler ERROR: ) expected
>>      ----
>>                function exportAnimation(jmol_movie, 500, 500, 180,
>>      rotate  <<<<
>>
> You misunderstood my instructions. You should not change the code of the
> function itself!
>
> The variables in the function definition must stay variables within the
> function. You cant't just change them to some arbitrary text or numbers.
> This will break the code.
>
> The idea behind having a user-defined function is that you can call it
> with a large number of parameters without having to modify it.
>
> In your case you would just call it like this after you have "installed"
> the original function code temporarily as I have described it:
>
> exportAnimation("jmol_movie","500","500","180","rotate axisangle {1 1 0}
> 2");
>
> I hope this is more clear now.
>
> Regards,
> Rolf
>
>
>


------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to