The window bounds are a list of coordinates {left, top, right, bottom}. You probably intended "400" to be the width, but it's the position of the right edge of the window and 400 is to the left of 1105, so you get a minimum width window. Change 400 to 1105 plus the desired width, e.g., 1505.
But before you pursue this further, Terminal has a better solution for this: Window Groups. If you set up a group of windows and save them as a Window Group, each time you open that group it will create windows with the same layout and appearance.
Window > Save Windows as Group…
You can even tell Terminal to open a selected window group at startup:
Terminal > Preferences > Startup > On startup, open: > Window group:
(As a shortcut, when creating a window group there's a checkbox for making it the startup group.)
To automatically run particular commands in those windows, you can create custom settings profiles and specify the command with
Terminal > Preferences > Settings > [profile] > Shell > Startup > Run command:
then create each window with the appropriate profile.
Going further, in Mac OS X Lion 10.7 you can have window groups automatically restore commands without creating custom profiles, by creating the terminals using
Shell > New Command
instead of running the command inside the terminal shell. When creating the window group, you can check "Restore all commands". (By default, it will restore a small set of "safe" commands, but you must explicitly tell it if you want it to re-run all commands when opening the group.)
Moreover, Lion Terminal supports Resume and will automatically restore all your windows each time you open Terminal. It will even restore "safe" commands for terminals created with New Command.
I found my own answer by digging a little deeper into this.
tell application "Safari"
do JavaScript "document.getElementsByName('files[]')[0].click();" in document 1
end tell
Using getElementsByName and the name attribute 'files[]' was all it took (and by the way was the ONLY way out many, many that worked in this case).
Best Answer
It is not a "Finder" window. It is owned by Safari
You have not made clear how you know which file to choose. So I assume you will be partially hard coding it into the script.
This example assumes you are able to form a path string to the file.
This example is also written to click and add an image to an Answer on one of these Ask-different pages.
You already know how to click buttons with the Applescript/js
But you can use keystrokes to enter the command G+cmd+shift which will open a 'Go to..' sheet in the 'Choose' dialogue window.
You then keystroke your path to your file.
The next two buttons 'Go' and 'Choose' are the default ones so you can just keystroke Return to hit them.
(This image was uploaded using the script)