Direct txt file upload

Anastasis Panayi's icon

Hello,
is there a way to direct (without popping up any window) upload a txt file in a patcher using it's path?

Thank you!

Nikolas K's icon

If you mean for example to read a txt with the [text] object, send a message to it like so: "read path/to/my/file/file.txt" and if the path is corect, it will read it.
Just be careful, if the file's path has spaces, put it all inside quotes.

Nikolas

Anastasis Panayi's icon

No i didn't mean that sorry!
Bad thank you i didn't Know that.
I want to load a file to umenu for example.
Can i do that with "folder" object or "opendialog".

I attached an example of what i want.

Thank you

tst29-direct-file-load.maxpat
Max Patch
Anastasis Panayi's icon

FOUND IT!!! =)

tst29-direct-file-load1.maxpat
Max Patch
Nikolas K's icon

Sorry for not following on your reply.
I'm glad you found it! If any other problem comes up...

But, just to make clear (I am curious now!!), you want to read lines from a text file and use them as items for the umenu?

Anastasis Panayi's icon

Yes this is what i want.
Sorry for not being clear.
Thank you anw! =)