Is it possible to use [makefilename] and [open $1] to open files whose names contain spaces? I tried quotes, but they are simply copied literally to the filenane, and any space breaks the message. Any suggestions?
Peter Todd wrote:
Is it possible to use [makefilename] and [open $1] to open files whose names contain spaces? I tried quotes, but they are simply copied literally to the filenane, and any space breaks the message. Any suggestions?
Try [list2symbol] from zexy.
Doesn't seem to work
I have this:
[1
|
[makefilename movie %d.mov]
|
[list2symbol]
|
[open $1<
|
[pdp_qt]
Result: opening movie quicktime_file_open: No such file or directory
Expected result: opening "movie 1.mov"
Marc Boon wrote:
Peter Todd wrote:
Try [list2symbol] from zexy.
Doesn't seem to work I have this: [1
| [makefilename movie %d.mov] | [list2symbol] | [open $1< |
the trick is to construct a list of symbols whcih are then concatenated by [l2s]
[makefilename movie %d.mov] will just output a symbol "movie" no matter what is sent to it (this is: only the first argument is taken into account!)
so you will have to put the changing part (the one with %d) into [makefilename], then create a list containing "movie" and the constructed symbol and then use [l2s].
or you can use [l2s] to construct the format-string (literal "movie %d.mov") as one symbol and then set [makefilename].
so many possibilities...
mfg.asd.r IOhannes
Marc Boon wrote:
Is it possible to use [makefilename] and [open $1] to open files whose names contain spaces? I tried quotes, but they are simply copied literally to the filenane, and any space breaks the message. Any suggestions?
you can construct symbols that hold spaces with [makefilename] and "%c" into which number 32 (ascii for space) is sent.
but if you don't want any trouble, use peter's suggestion ;-)
mfg.a.sdr IOhannes