hiding Finder windows

Hi,
looking at the properties of a Finder window we can read following entry > visible:true
This property is written not for the Finder process itself, but his windows, as i understand it correctly.
I tried to hide away all non-frontmost finder windows, but i get an error trying it. Collapsing windows bothers me.
See yourself:

tell application "Finder" to set visible of Finder windows whose index > 1 to false

or:

tell application "Finder"
	set win to  windows whose index > 1
	
	repeat with a in win
		set visible of  a to false
	end repeat
	#Error -10006
end tell

Look again: the visible property of a window is r/o - read only.
Finder itself has a visible property that is writable.

Hi Joy,

A workaround might be to send the window to somewhere else.

gl,
kel

@Alastor: thanks for the clarification.

@kel1: thanks for the hint, but seems to me more laborious than useful. I never had that much fun with spaces.