>>But is activewindow() unique across users?? I don't think so.
Hmm. If ActiveWindow is a handle then I'd hope it's unique on a machine... should not matter across machines as long as the temp file is local.
>>And of course, a key is only unique for a limited number of cases. E.g. a numeric key of, let's say, 5 positions is not enough if there are potentially more that 99.999 cases.
Yep, if they need more than 99,999 files they'd want an extra character... or to use alphanumeric in which case you can get hundreds of billions of filenames in 5 bytes. ;-)
"... They ne'er cared for us
yet: suffer us to famish, and their store-houses
crammed with grain; make edicts for usury, to
support usurers; repeal daily any wholesome act
established against the rich, and provide more
piercing statutes daily, to chain up and restrain
the poor. If the wars eat us not up, they will; and
there's all the love they bear us."
-- Shakespeare: Coriolanus, Act 1, scene 1