Sorry, just realized that my great ascii work might not display well 
on some email clients.

The patch is in attachment.

jorge


-----Original Message-----
From: [EMAIL PROTECTED] on behalf of Jorge Cardoso
Sent: Wed 7/16/2008 8:48 PM
To: pd-list@iem.at
Subject: Re: [PD] Backslash
 
Thanks,

[makefilename %c] worked.

I ended up with this:

                        [bang]
                          |
[dumpOSC 999]            ------
 |                       | 92 (
[OSCroute /message]      ------
 |                        |
[unpack s s s]           [makefilename %c]
            |           /
           [symbol2list]
            |
           [list2symbol / ]
            |
           -------------
           | open $1   (
           -------------
            |
           [pix_image]

It's not pretty, but it works.

Thanks for the help!

jorge

-----Original Message-----
From: [EMAIL PROTECTED] on behalf of Frank Barknecht
Sent: Wed 7/16/2008 6:43 PM
To: pd-list@iem.at
Subject: Re: [PD] Backslash

Hallo,
Jorge Cardoso hat gesagt: // Jorge Cardoso wrote:

> I'm having a problem with backslashs on windows and none of the solution I 
> found
> on the web works in my case:
>
> I have an OSC message that has a path to a file. Something like: 
> "c:\folder\image.jpg"
>
> How can I convert that, in PD, to "c:/folder/image.jpg"? I can't control how 
> the OSC messages
> are generated...

For example with attached pdlua external (needs pdlua)

You need some kind of external, as it's not possible with pure Pd to
split a symbol at a certain character. You could also use something
like Zexy's symbol2list for this task - use

 [92(
 |
 [makefilename %c]

to generate a backslash symbol to feed into s2l's right inlet then.

Using Lua has the big advantage that you can do some more string
processing in the same object immediatly and in my experience, once
you start with text processing you often need a bit more power anyway,
that's why I'd prefer Lua here.

Ciao
--
 Frank Barknecht                                     _ ______footils.org__




 

Esta mensagem (incluindo quaisquer anexos) pode conter informação confidencial 
ou legalmente protegida para uso exclusivo do destinatário. Se não for o 
destinatário pretendido da mesma, não deverá fazer uso, copiar, distribuir ou 
revelar o seu conteúdo (incluindo quaisquer anexos) a terceiros, sem a devida 
autorização. Se recebeu esta mensagem por engano, por favor informe o emissor, 
por e-mail, e elimine-a imediatamente. Obrigado.


This message may contain confidential information or privileged material, and 
is intended only for de individual(s) named. If you are not in the named 
addressee, you should not disseminate, distribute or copy this e-mail. Please 
notify the sender immediately by e-mail if you have received this e-mail by 
mistake and delete this e-mail from your system.




Esta mensagem (incluindo quaisquer anexos) pode conter informação confidencial 
ou legalmente protegida para uso exclusivo do destinatário. Se não for o 
destinatário pretendido da mesma, não deverá fazer uso, copiar, distribuir ou 
revelar o seu conteúdo (incluindo quaisquer anexos) a terceiros, sem a devida 
autorização. Se recebeu esta mensagem por engano, por favor informe o emissor, 
por e-mail, e elimine-a imediatamente. Obrigado.


This message may contain confidential information or privileged material, and 
is intended only for de individual(s) named. If you are not in the named 
addressee, you should not disseminate, distribute or copy this e-mail. Please 
notify the sender immediately by e-mail if you have received this e-mail by 
mistake and delete this e-mail from your system.

#N canvas 465 67 716 498 10;
#X obj 189 176 symbol2list;
#X obj 254 126 makefilename %c;
#X msg 254 105 92;
#X obj 126 139 unpack s s s;
#X obj 254 84 bang;
#X obj 188 208 list2symbol /;
#X msg 187 240 open \$1;
#X obj 188 302 pix_image;
#X obj 122 77 dumpOSC 9999;
#X obj 126 110 OSCroute /message;
#X text 254 290 Rest of patch removed...;
#X connect 0 0 5 0;
#X connect 1 0 0 1;
#X connect 2 0 1 0;
#X connect 3 2 0 0;
#X connect 4 0 2 0;
#X connect 5 0 6 0;
#X connect 6 0 7 0;
#X connect 8 0 9 0;
#X connect 9 0 3 0;
_______________________________________________
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list

Reply via email to