[Closed] how to print or format without leading/trailing quotes?
Is there anyway to use the print or format commands and NOT have it output the result in quotes? I’ve written a function that outputs a bunch of code into a filestream and if possible I’d like to save it out without having to go into the file and clean out the quotation marks.
Is this possible? Thanks!
Nevermind… figured it out in my next step.
Outputting the code to a filestream takes care of the issue. At first I was simply printing the code to the Listener and copying/pasting it back into the editor. But if this is useful to anyone else, the filestream doesn’t include those leading and trailing quotes.
I think in general MAX Scripts file handling is just poor. If you issue certain kinds of print commands it may have the quotes. If you issue others, it’ll depend on the size of the string you’re trying to print. If you’re reading a huge chunk of text and then printing it (~2,000kb) then it will lead with “#^ or something like that and it will not read to precisely the right character with a command like findstring. I played around for a long time looking for solutions to these problems and never found any. In the end I just built work arounds into my script and process.