Hi Guys,
I am writing a Syntax Highliter for MaxScript and have some issues with the custom build system. I use a COM component I didn’t write, that allows me to send the code to 3ds Max to be executed. It accepts the full file path of the current script.
My build file is:
{
"cmd": "mxscom.exe", "-f", "$file"],
"selector": "source.MaxScript"
}
where:
mxscom.exe is the com object, in the same directory of sublime_text.exe
-f is the option to let the com object accept file paths
$file is the Sublime Text variable of the current full file path
The build works perfectly if there are not spaces in the file path:
C:\DevDirectory\MyScript.ms - works
If there are spaces, the OS adds double quotes to define the path so the $file variable becomes:
“C:\Dev Directory\MyScript.ms” - does not work
The error in 3ds Max Listener looks like:
-- Runtime error: fileIn: can't open file - ""C:\Dev Directory\MyScript.ms""
during OLE automation function call
Is there any way to make it work with paths containing spaces?
Is there any way to strip the double quotes, provided it is the actual issue?
Thank you very much
- Enrico