Interesting (and a useful cheap plug: FWM looks very cool).
But this slight modification to your script. First, I think the close Finder window 1 is redundant. In my case, anyway, when I open a folder in this way that is already open I do not get a new window, the current window moves (raising the question of how to open two windows in this manner if both point to the same folder). But anyway, here is a slight modification:
tell application "Finder"
activate
set the_folder to make new folder with properties {name:"A"}
set {x1, x2, y1, y2} to {0, 44, 400, 100}
repeat 5 times
set bounds of container window of the_folder to {x1, x2, y1, y2}
open the_folder
delay 1
--close Finder window 1
set {x1, x2, y1, y2} to {(x1 + 100), (x2 + 100), (y1 + 200), (y2 + 200)}
end repeat
delete the_folder
end tell
If you run this script once, it works fine. But run it a second or third time and (at least for me, running 10.3) there is a funny glitch. The second time the script runs, the y2 variable will be ignored in the first iteration through the loop. In other words, the first time through the script you get what you expect: a small window gradually gettting bigger. But subsequent times, you get a tall window first which then gets small second and then gradually bigger.
Strange, eh?
Even stranger: try it without commenting out the close Finder window 1 line. Then it ignores the y2 bound altogether and always uses the same default height as it goes through the repeat loop.
What it means for me is that trying to set the window size this way doesn’t work reliably because sometimes Finder seems to ignore the the “y2” bound and uses the folder’s (previous) default height instead.
Any ideas?
John