• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Opening a folder is AS vrs double clicking
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Opening a folder is AS vrs double clicking


  • Subject: Opening a folder is AS vrs double clicking
  • From: Jim Brandt <email@hidden>
  • Date: Fri, 13 Nov 2009 07:45:16 -0600

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
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Opening a folder is AS vrs double clicking
      • From: Luther Fuller <email@hidden>
  • Prev by Date: Smartest way to write a queuer script
  • Next by Date: Re: Opening a folder is AS vrs double clicking
  • Previous by thread: Smartest way to write a queuer script
  • Next by thread: Re: Opening a folder is AS vrs double clicking
  • Index(es):
    • Date
    • Thread