I think it is confusing to provide such detail for things that don't work.
####So, let me see if I now have it straight about what CAN be done:
- The only change in the stack of windows that can be made, is to make a selected window as frontmost.
- You could do this by telling AppleScript to set the index of a window to 1
- When you move a window to the front, all of the other windows remain in the order that they were.
####However, with a simple AppleScript, we CAN move the first window to the back
--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- MOVE FIRST WINDOW TO BACK
--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tell application "TextWrangler"
set winList to every window
set indexList to index of every window
set nameList to name of every window
log nameList
log indexList
--- It appears that the GET of every window always gets in
--- the current stack order
--- MOVE CURRENT WINDOW 1 TO BACK ---
-- Set each window index to 1 in reverse order
-- except for current window 1
repeat with oWin in (items 1 through -2 of reverse of winList)
log (name of oWin)
set index of oWin to 1
end repeat
end tell