I want to create a new folder. I want:
1) the bounds to be {575, 215, 1200, 600} 2) the sidebar to not be visible 3) the toolbar to not be visible 4) the view to be list view
Here is the script I put together:
(* Last Modified: 12-Nov-2009 test script to create and open a new folder *) property f_Location : "HD1:Misc:" set nf_bounds to {575, 215, 1200, 600} -- bounds for making a new folder set folder_name to "x" tell application "Finder" activate set new_folder to make new folder at folder f_Location with properties {name:folder_name, bounds:nf_bounds, toolbar visible:false, sidebar width:0} set current view of new_folder's container window to list view open new_folder end tell
The "open new_folder" statement opens the newly created folder window, but the side bar and tool bar are visible and the bounds are {86, 134, 871, 578}.
If I just double click the folder's icon, a window opens with the side bar and tool bar hidden, and the bounds of {575, 215, 1200, 600) as set.
So it appears that the open statement issued to the Finder from Applescript is not the same as double clicking the icon. Obviously, different criteria determine the position and status of the window.
So, my question: How do I open a window, from Applescript, showing the contents of the newly created folder such that the criteria I established in the properties when I create the folder an honored, as they are if I double click the icon to open that same window?
TIA,
Jim Brandt
|