An ExtendScript script (.jsx file) or HTML5 panel (which calls ExtendScript) can do that. Please write me directly, and I'll get you a sample script (and panel) which do so.
b b b at adobe dot com
Reason for not just posting a sample script: There is a way of doing it, that would work, in 7.x. However, there is a much BETTER way of doing it in the version we <ahem> technology-previewed at NAB, which will be generally available, Really Soon Now™. Unless you're very pressed for time, we recommend you wait for the newer better way.