how to move/make a new window underneath the other windows

Hi,

I have a script that creates a window (it’s a Mail.app script) so it uses a command from the Mail.app library:


set theWindow to make new message viewer with properties {visible:true}

Now the window appears at the top of all windows, which is I assume the end of the list of (all or just Mail.app?) windows.
How can I put it at the start of the windows – ie at the bottom.


move window index of theWindow to beginning of the windows

Would that do it or do I have to do it another way?

Kim

I tried :


set myindex to index of theWindow
move window myindex of the windows to beginning of the windows

but it doesn’t work.