Read image - error

Franci Ferri's icon

Hello guys,

I'm new of this world, and I'd like to sorry if my questions sounds stupid.

I'm creating a simple patch who catch a .jpg file with the "read" attribute.
I made this object: "read sport.jpg" (i got my image on my desktop folder)
I got this error: "no such object".

So I've understood the path is wrong.
But I really don't know where I can set it.

Many thanks to all of you.
Francesca

Floating Point's icon

not sure what object you are using to read the file but you probably need to specify the path in the read message, like: read ~\Desktop\sport.jpg (and if the path has spaces in it you'd need to enclose the path argument in double quotes). But I'm not sure if there are any built in objects that can actually read a jpg file...

Franci Ferri's icon

Dear FloatingPoint,

thank you for your help, but it still doesn't work.
I've tried to add read ~\Desktop\sport.jpg but Max correct the path like this: read ~Desktopsport.jpg...

Please, I'm disperate!
Thank you a lot

01-Test-Patch.maxpat
Max Patch

Floating Point's icon

you need to use a message box, not an object box to send messages generally.

Max Patch
Copy patch and select New From Clipboard in Max.

if you're using windows use backslash, on mac use forward-slash

Franci Ferri's icon

Floating Point.... You saved my project. Really. God bless you!
Thank you so much! Love. Francesca