RE: scripting question

Date : Thu, 6 Apr 2006 14:19:51 -0400
To : <XSI(at)Softimage.COM>
From : "Stephen Blair" <Stephen_Blair(at)Softimage.COM>
Subject : RE: scripting question
Yes.

If you don't want to create a command in the other language, you can
always use these two methods of the Application object:

- Application.ExecuteScript 			// executes the script
in a file
- Application.ExecuteScriptCode		// executes a string of script
code

-----Original Message-----
From: owner-xsi(at)Softimage.COM [mailto:owner-xsi(at)Softimage.COM] On Behalf
Of Daniel Goupil
Sent: April 6, 2006 2:09 PM
To: XSI(at)Softimage.COM
Subject: Re: scripting question

and u can call a script from other language like calling a jscript from
a vbscript with ExecuteScript

Stephen Blair wrote:
> Ok, I see.
>
> Both scripts will run using the correct language.
> XSI knows which language to use for the different buttons. 
>
> Steve
>
> -----Original Message-----
> From: owner-xsi(at)Softimage.COM [mailto:owner-xsi(at)Softimage.COM] On 
> Behalf Of Joey Ponthieux
> Sent: April 6, 2006 1:51 PM
> To: XSI(at)Softimage.COM
> Subject: Re: scripting question
>
> Stpehen,
> 	I understand this about the script editor. What I am curious
about 
> though is say you've written a script in VB which you want to reuse 
> freequently. You create a Button or use some other method to have 
> access to it quickly. But then I write another script as Java and 
> place it in a button. Will both scripts operate from their respective 
> buttons regardless what the script editor prefernce is or will only 
> the script written in the language set in the script editor run?
> Joey
>
>
> Stephen Blair wrote:
>   
>> Hi Joey
>>
>> You can always change scripting languages.
>>
>> For example, let's assume the scripting language is currently
>>     
> VBScript.
>   
>> Then, in the Script Editor:
>>
>> Write and run VBscript code. eg
>>         LogMessage "Hello"
>> Change the language to JScript.
>> Click File > New to clear the script editor.
>> Write and run some JScript code. eg
>>         LogMessage( "Hello" );
>>
>> TIP - In the Script Editor, you can right-click and the context menu 
>> has commands for setting the current language.
>>
>> Steve
>>
>> -----Original Message-----
>> From: owner-xsi(at)Softimage.COM [mailto:owner-xsi(at)Softimage.COM] On 
>> Behalf Of Joey Ponthieux
>> Sent: April 6, 2006 12:56 PM
>> To: XSI(at)Softimage.COM
>> Subject: Re: scripting question
>>
>> Todd,
>>         Thanks. Interesting page, this ought to come in real handy.
>>
>> I'm a bit confused about the VBScript versus JavaScript thing though.

>> I think I could see why JavaScript is favored, but does that mean you

>> have to run all your scripts in one versus the other? I guess what I 
>> am wondering is once you set XSI preferences to JavaScript, does that

>> mean all scripts that you develop have to be JavaScript from that 
>> point , or can you you mix VBScript and JavaScript and XSI knows how 
>> to figure out which is which?
>>
>> Joey
>>
>> todd akita wrote:
>>     
>>> Hey Joey -
>>>
>>> Have you looked at this?  Michael Isner wrote it a little while back
>>>       
>
>   
>>> and it's not a bad start.
>>> And luckily it uses vbscript which not many people seem to use 
>>> noawadays but it might help.
>>> http://www.isner.com/tutorials/commands_vs_object_model2.htm
>>>
>>> Also his book has a short but pretty easy-to-understand section on 
>>> basic scripting in jscript which people seem to use more than 
>>> vbscript.  So he starts with commands and then finds the equivalents
>>>       
>> in object model.
>>     
>>> Once you get used to it it will make sense and be pretty easy.
>>>
>>> Actually a lot of the adobe scripting is very similar to XSI's 
>>> object model so these skills will be very useful and portable.  On 
>>> the rare occasions I've had to soil my fingers with mel I've come to
>>>       
>
>   
>>> really appreciate xsi's scripting...
>>>
>>> -T
>>>
>>>       
>> -
>> ---
>> Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in
>> body:
>> unsubscribe xsi
>>
>> ---
>> Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in
>>     
> body:
>   
>> unsubscribe xsi
>>     
>
>   


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

---
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.