Re: Executing a String in JScript?

Date : Wed, 29 Mar 2006 10:01:48 +0200
To : XSI(at)Softimage.COM
From : André Adam <a_adam(at)49games.de>
Subject : Re: Executing a String in JScript?
Hi Martin, eval() is perfect, basically the function I've been looking for. Thanks!

   -André


Martin Chatterjee wrote:

try:

//-----------------------------
var sTmp = "LogMessage(\"Hello World!\");";

eval(sTmp);
//-----------------------------

Cheers,

Martin

_______________________________________


Martin Chatterjee

            Lead TD (Creatures | RnD | Pipeline)

            Spans & Partner GmbH
            [martin.c(at) spans.de]




From: owner-xsi(at)Softimage.COM [mailto:owner-xsi(at)Softimage.COM] On Behalf Of André Adam
Sent: March 28, 2006 8:31 AM
To: xsi(at)Softimage.COM
Subject: Executing a String in JScript?

It would be very convenient if I could get a certain string to be considered regular code inside of a jscript. To make something like this actually return the object's x-position:

var a = new Array(".PosX.Value");
LogMessage(Selection(0) + a[0]);

Is there an Execute() or something similar available? Thanks in advance!

-André




--- Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body: unsubscribe xsi


Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available.
This site supposedly brought to you by Benjamin Grosser and the Imaging Technology Group.