Re: Finding only visible files...
Re: Finding only visible files...
- Subject: Re: Finding only visible files...
- From: John Delacour <email@hidden>
- Date: Fri, 20 Jun 2003 23:22:38 +0100
- Mac-eudora-version: 6.0a23
At 10:18 am -0700 9/6/03, Domains4Days.com wrote:
I am using the line below and to search for a file. Currently, the dialog
window is finding both visible and invisible files. I would like to limit
the search to only visible files. How can I accomplish this?
set thefilepath to (choose file)
You might consider using ls in the shell. Do 'man ls' in Terminal to
see all the options.
Here's a simple example that sets the directory to search and then
returns an alias of the file you choose. There was once an osax
(Donald's Commands I think) that allowed you to set the directory,
and Frontier and OneClick did too, but all these nice touches no
longer exist for Applescript in OS X. The shell supplies the want in
this case.
Unfortunately, as you'll see from this example, you're stymied if
there's any Unicode knocking around.
set macdir to "" & (path to fonts)
set _dir to quoted form of POSIX path of macdir
set ls to paragraphs of (do shell script "cd " & _dir & "; ls")
set fname to macdir & (choose from list ls) as alias
-- JD
.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.