Variable external to max

personal_username's icon

Hi all,
I have 10 sounds and I want my patch to load file1.wav the first time it starts, file2.wav the second time I open the same patch, and so on...

What's the quickiest way to do this?
I was wondering about writing a txt file from [shell] but how?
And moreover... Is there. A simpler way?
Thanks a lot!

Roman Thilenius's icon

you can write a text file using [preset], [coll], or [text], thats much better.

and define a custom path inside the search path, like /patches/thisapp/thisappsprefs.txt

the folder /thisapp must be present prior to writing the file.

personal_username's icon

Roman, i just got the time to get into that: very straightforward!
Thanks a lot!
PS i used text btw, didn't know of an object for direct editing of txt files...