Forums > MaxMSP

exportimage with a automated unique filename

November 15, 2006 | 5:26 pm

hi,

i want to save an image from a matrix to my harddisk… for this i use "exportimage name jpeg" so far so good…

now my problem:
i want to save each picture with an unique random filename (15 characters) like:

jeiskdoeildfftz.jpg
bkioeudjsullfne.jpg
fgdgnuidgdfsgnm.jpg
.
.
.

so each of the 15 characters is choosen randomly from the alphabeth…

is there any special object?

thx
peter


November 15, 2006 | 5:34 pm

There’s not a special object for everything, but a little patching
goes a long way.

jb

#P button 111 29 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 111 198 32 196617 print;
#P newex 111 171 75 196617 sprintf %s.jpg;
#P newex 111 148 40 196617 itoa;
#P newex 111 125 61 196617 zl group 15;
#P newex 111 102 31 196617 + 97;
#P newex 111 80 58 196617 random 26;
#P newex 111 56 40 196617 Uzi 15;
#P connect 1 0 2 0;
#P connect 2 0 3 0;
#P connect 7 0 0 0;
#P connect 5 0 6 0;
#P connect 4 0 5 0;
#P connect 3 0 4 0;
#P connect 0 0 1 0;
#P window clipboard copycount 8;

Am 15.11.2006 um 18:26 schrieb Peter T.:

>
> hi,
>
> i want to save an image from a matrix to my harddisk… for this i
> use "exportimage name jpeg" so far so good…
>
> now my problem:
> i want to save each picture with an unique random filename (15
> characters) like:
>
> jeiskdoeildfftz.jpg
> bkioeudjsullfne.jpg
> fgdgnuidgdfsgnm.jpg
> .
> .
> .
>
> so each of the 15 characters is choosen randomly from the alphabeth…
>
> is there any special object?
>
> thx
> peter
>
>


November 15, 2006 | 6:08 pm

thank you very much for the fast answer… know i know more about uzi…


November 15, 2006 | 6:28 pm

If you want a more organized unique name, you can use javascripts time
functions and construct a name based on Year + Month + Day + Hour +
Minute + Second + Millisecond.

wes

On 11/15/06, Peter T.

wrote:
>
> thank you very much for the fast answer… know i know more about uzi…
>


Viewing 4 posts - 1 through 4 (of 4 total)