Sending forbidden characters to Text object ?

    Jul 23 2013 | 7:10 am
    Hi My text format is something like thisopen "terminal"; "OSC" 8997; But when I send this to Text Object using cr command it filters these characters " ;open terminal OSC 8997
    My question : is there a way to store these characters " ; within Text object ?

    • Jul 23 2013 | 8:24 am
      if you add a \ before each conflicting character it should do what you want. Plus, you can simply pass your entire string as one symbol thanks to the [tosymbol] object, maybe you should try this too ?
    • Jul 23 2013 | 10:54 am
      The characters aren't "forbidden", they just have special meaning in Max. Quotation marks serve to delimit symbols with embedded spaces. Symbols that don't have embedded spaces don't need quotation marks, so the Max parser loses them for you. It may not seem like a feature, but it is (sorta).
      There are a lot of other special characters (commas, semicolons, dollars, etc.) It's important to be aware of these otherwise you're going to get tripped up by other things.
      The backslash has the special meaning of "ignore the special meaning of the next character," which can be useful (and is one of Vichug's suggestions). However, if your text gets parsed multiple times by the Max engine, each parse operation will strip away a layer of backslashes. The upshot of this is that you may need to add multiple backslashes to get the effect you want in your patch. You may ultimately need to write something like open \\\\"terminal\\\\" 127. You may need to experiment to get this right.
    • Jul 23 2013 | 10:41 pm
      This \ really helped I used sprintf for my data manipulation but it seems it does not like \ specially when it comes with " ,so I return to good old massage box and $ thing .
      Thanks to your thoughts VICHUG and PETER its almost done the only thing is left is the annoying white space at the beginning of my two symbols . any solution to get rid of that ?
      Here is the patcher
    • Jul 23 2013 | 11:36 pm
      The sprintf approach seems to work here and no issues with whitespace.
    • Jul 24 2013 | 12:34 am
      Ahh! Many thanks ,I totally forgot the symout