I have a script that opens the Documents folder and performs a search (I usually run it from LaunchBar), but when it opens the window it opens at a smaller size and different position than I want (presumably the size and position of the last Finder window I opened), then ‘jumps’ to the size and position I’ve set.
set theSearch to "some text"
tell application "Finder"
set newWindow to make new Finder window
set target of newWindow to (path to documents folder as text)
tell Finder window 1
set the bounds to {588, 179, 1971, 1177}
set its toolbar visible to true
set its sidebar width to 190
set current view to list view
end tell
tell list view options of Finder window 1
set the sort column to name column
set sort direction of column id name column to normal
end tell
activate
end tell
tell application "System Events"
keystroke "f" using {command down, option down}
delay 0.3
keystroke theSearch
end tell
Is there a way to set the bounds of the Finder window before opening it, so that it doesn’t open the finder window and then jump to the size and position that I want it, it just opens at the bounds I’ve set?