Re: Scripting Finder to open a hidden . folder...
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