• 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
Re: Scripting Finder to open a hidden . folder...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scripting Finder to open a hidden . folder...


  • Subject: Re: Scripting Finder to open a hidden . folder...
  • From: KOENIG Yvan <email@hidden>
  • Date: Wed, 13 Aug 2008 19:21:21 +0200


Le 13 août 2008 à 19:00, KOENIG Yvan a écrit :


Le 13 août 2008 à 18:48, Jay Louvion a écrit :

On 13.08.2008 18:42, "Stranathan, Dan" <email@hidden> spake thus:

Any ideas on how to make AppleScript handle this location without complaints?

I’d personnally try throwing some good ol’ shell scripting at it

tell application "Finder" to set theFolder to choose file
set theFolder to quoted form of POSIX path of theFolder
do shell script "open " & theFolder


Thanks Jay. I never thought that when I wish to select a hidden folder, I was able to use Choose File. I knew that Choose Folder was unable to do what I wished and didn't search in the cousin tool.

I will just add that there is no need to speak to the Finder to call Choose File (or Choose Folder ) which is a Standard Additions function.


It would have been better to test before sending this response.

I was unable to choose a folder from Choose File.
So, I coded a workaround.
I select a file stored in the wished folder and ask System Events to grab its container.
Then, Finder proves to be able to open the folder.


set theFile to ((choose file) as Unicode text)
tell application "System Events" to set theFolder to get path of container of (get properties of item theFile)
tell application "Finder" to open theFolder


Of course, it's usable only if the folder contains at least one file.

Yvan KOENIG (from FRANCE mercredi 13 août 2008 19:20:06)


_______________________________________________ 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
References: 
 >Re: Scripting Finder to open a hidden . folder... (From: Jay Louvion <email@hidden>)
 >Re: Scripting Finder to open a hidden . folder... (From: KOENIG Yvan <email@hidden>)

  • Prev by Date: Re: Scripting Finder to open a hidden . folder...
  • Next by Date: Re: Scripting Finder to open a hidden . folder...
  • Previous by thread: Re: Scripting Finder to open a hidden . folder...
  • Next by thread: Re: Scripting Finder to open a hidden . folder...
  • Index(es):
    • Date
    • Thread