Windows positioning with applescript I want to set the position of some windows to certain coordinates.

In particular I have 4 possible positions that those windows should have.

For example if I have 4 windows opened I want them to go one per each position, instead if I have 6 windows opened I want the first 4 windows to go to to position 1,2,3,4 then the last 2 to position 1 and 2. I mean if I had 12 windows opened those should go to position 1,2,3,4,1,2,3,4,1,2,3,4.

At the moment I've managed to get the IDs of those windows in a list.

--list with all windows
set Auch to {...}

repeat with theWindow in Auch
    tell (windows whose title contains theWindow) -- it's working
        activate
        set position to {200, 20} --position #1
    end tell
end repeat


This is the code I've written: I'm sure there's a smart way to solve this problem.
Use the modulo operator ! 

set Auch to {...}      --list with all windows
set positionArray to {{..}, {..},{..}} -- The array where you store the positions you want. 

set ind to 0
repeat with theWindow in Auch
    tell (windows whose title contains theWindow)
        activate
        set position to item ((ind mod (count of positionArray)) + 1) of positionArray --AppleScript arrays start at 1 
        set ind to (ind + 1)
    end tell
end repeat