on run {input, parameters}
set topleft to {5, 25}
set topright to {860, 25}
set bottomleft to {5, 520}
set bottomright to {860, 520}
set locations to {topleft, topright, bottomleft, bottomright}
repeat with loc in locations
tell application "Terminal"
activate
with timeout of 1800 seconds
set firstpath to item 1 of input
do script with command "cd " & (quoted form of POSIX path of firstpath)
tell window 1
set position to loc
set number of columns to 130
set number of rows to 32
end tell
end timeout
end tell
end repeat
end run




