tell application "textsoap9"
activate
-- Starting position for the first window
set startX to 50
set startY to 50
set offsetIncrement to 30
-- Get all TextSoap windows
set windowCount to count of windows
-- Loop through each window and position it (in reverse order)
repeat with i from 1 to windowCount
set currentWindow to window i
-- Calculate position for this window (reversed)
set xPos to startX + ((windowCount - i) * offsetIncrement)
set yPos to startY + ((windowCount - i) * offsetIncrement)
-- Set the window bounds
set bounds of currentWindow to {xPos, yPos, xPos + 1200, yPos + 800}
end repeat
end tell