n = 6000; width = 200; height = 100; dir = getDirectory("Select destination directory"); setBatchMode(true); for (i=1; i<=n; i++) { showProgress(i, n); newImage("image"+pad(i), "8-bit Black", width, height, 1); setColor(255); drawString(pad(i), 20, 20); saveAs("tif", dir+getTitle); close; } function pad(n) { str = toString(n); while (lengthOf(str)<5) str = "0" + str; return str; }