|
Running ScriptsHi there,
Sorry I know this is a bit of a naff question but I can’t figure it out…
I’m trying to run a script from within a toolbar button so I can modify the script externally and the button will always be running the current script file.
I found this in the docs, but no info on how to do it??
• You can create a custom command to run a script from a button on a custom toolbar.
|
|
|
|
Did you look in the docs for information about Custom Commands and how to create them?
Eric T.
|
|
|
|
Well i don’t really want to make a Custom Command just yet,
I’d just like to run this script I’m working on externally. Is that possible?
RunScript “C:\Softimage\XSI_7.01\Data\XSI_SAMPLES\Scripts\test.vbs”
I guess it’s not that easy?
|
|
|
|
Don’t sure how about toolbars, but on shelf just drag file from browser and you get ‘Add Script Command’
|
|
|
|
Ahh great, thanks streaker that’s exactly what I need!!! It did come back with a bit of an error at the start…
‘ ERROR : 2000 - File not found - C:\Softimage\XSI_7.01\Application\DSScripts\Body Simple.vbs
BodySimple
but you just have to point it in the right direction and it works fine for the time being!
Thanks
|
|
|
|
Here try this
[INDENT]sub Execute
‘Points to the file is
filepath = Directory & File
‘Scripting Language: “Python” - “VBScript” - “JScript”
Language = “VBScript”
ExecuteScript filePath, Language
end sub
Directory = “\Data\Scripts\Biped\”
File = “script.vbs”
Execute
[/INDENT]
|
|
|