backslash
Hello,
I need to put a backslash in a message box for a message to [shell] but I can't seem to do this.
Is it possible?
I tryed to format the message with [combine] and [sprintf] without success.
Any help would be appreciated.
Try something like this using [tosymbol] and then one [sprintf] object.
lh
Hi, thank you but it does nothing.
The name of the usb key contains a space and I need to set a backslash before the quotes.
But the backslash is reserved! How can I do?
you have to escape both the quotes and the backslash with a backslash:
Ok 3 backslashes, I tryed with 2 but one miss ...
Thank you very much, works fine.
Hi all, found this thread as I'm having a similar issue with the below patch. Got it close with the info in this thread, but not right. Basically I don't know how to add a "\" as the very last character in a prepend object as Max keeps erasing it. I used your recommendations but it introduces other problems. Then also I need to modify an append so it erases a few characters from the text before appending new characters. Spacing also gets messed up. Specific questions in my patch pasted below. Thank you!
Your problem is even more complex than you think...
forming that osascript message is going to be different if the file path has
empty spaces inside or not.
If not, max refuses to add quotation marks arround it,
like "aaabbb" can not be done in max using tosymbol
and if one forces it to do so, like sprintf symout \\\"%s\\\"
\"aaabbb\" as result is ok, but if one inputs path which has space inside
name will end with extra slash, making path unusable.
One has to check if path has spaces or not.
If not, one needs escaping quotation marks, if it does than not.
Besides that, ' is missing in append -e 'end tell'
it should be:
append ' -e 'end tell'
Another thing - that regexp to remove Macintosh HD:
from the path might work on boot volume,
but if you want to open file on different partition or external drive it will fail.
Rather use conformpath
-----------
here is patch that could help you with that
works perfectly, thank you!