It is currently 19 May 2013, 12:33

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Sendin parameters to scripts through ExecuteScript
PostPosted: 04 Jul 2012, 04:10 
Offline

Joined: 16 Jun 2009, 09:28
Posts: 79
Hi there,
I'm just having a little difficulty sending parameters though Application.ExecuteScript to functions within the scripts.

So say I have a script called "test" that looks something like this -
Code:
function TEST(message){
   logmessage (message);
}


I could run it from within another script like this -
Code:
Application.ExecuteScript("test.js","JScript","hello");

But how could i send something to the message component of the test script. I've tried adding it after the fuction name but it deosnt seem to work.

Any ideas?
Thanks,
Pete


Top
 Profile  
 
 Post subject: Re: Sendin parameters to scripts through ExecuteScript
PostPosted: 04 Jul 2012, 04:52 
Offline

Joined: 28 Sep 2011, 10:33
Posts: 82
http://softimage.wiki.softimage.com/sdkdocs/Application_ExecuteScript.htm

ExecuteScript ( script path, script language, function name, array of parameters )

The last "array of parameters" has to be an array. It won't work with strings even if you only need 1 parameter.

aParams = ["hello"]
ExecuteScript("c:\\test.js", "JScript","TEST", aParams);

_________________
M.Yara
Character Modeler | Softimage Generalist (sort of)


Top
 Profile  
 
 Post subject: Sendin parameters to scripts through ExecuteScript
PostPosted: 04 Jul 2012, 06:03 
Offline

Joined: 16 Jun 2009, 09:28
Posts: 79
Ahh,
I've never used an array in Softimage before :/
That makes total sense now though.

Thanks!
Pete


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group