selection issue

Hi,
i want to get in some way, the selected items in finder window 2. Because:

tell app "finder" to get the selection

.works only with the frontmost items. And something like:

tell application "Finder" to get the selection of folder of window 1

returns an error.

So, my question is: how to identify selected items as such?

EDIT: i got it. http://macscripter.net/viewtopic.php?id=20804