Re: Making files
Re: Making files
- Subject: Re: Making files
- From: Paul Berkowitz <email@hidden>
- Date: Sun, 14 Apr 2002 19:19:18 -0700
On 4/14/02 7:02 PM, "Matthew Stuckwisch" <email@hidden> wrote:
>
>> apparently I missed a change in the language (the guidebooks still say
>
>> that "new file" is valid, though neither Script Editor nor PB accept it)
>
>> .
>
> 'choose file name' - check Standard Additions. It actually lets you set
>
> the
>
> location (through the usual locator window dialog) as well as the name.
>
>
Aha! Next step...any way to get it to hide the invisibles, for both this
>
and on choose file? (files that start with a periods get nasty when
>
viewing some folders)
I was going to reply when you asked on AS Studio list, but I couldn't find a
satisfactory answer. here's as much as I know:
You can't do precisely that, but you can do better IF you know that you can
specify files of a certain file type. Can you? It can be tricky in OS X
since files are not absolutely obliged to have file types. And - big booboo
here - you can't include "" in your list of file types to cover this
eventuality since the very .hidden files you want to exclude have no file
type! Since it's too much to expect the Unix Apple developers to give these
files a file type of their own (which would have been very simple), the
AppleScript guys should probably add a new parameter or two to 'choose file'
to allow discrimination via file name extension and/or simply an 'excluding
hidden files - boolean' parameter.
But if you CAN specify which file type (e.g. if they are your own files to
which you can give a file type via the Finder when you make them) then
choose file of type {"ttxt"}
or maybe they're applications
choose file of type {"APPL"}
then you can exclude everything else, including those hidden files.
>
>
I also think someone should go through the AppleScript Guidebooks and
>
update them. Last revision for most was in 2000--before X was even in
>
public beta. (granted, help via the list is a whole lot more helpful ;) )
Probably they will update them when things settle down. Too much is changing
too rapidly (which is a very good thing - it's generally changing for the
better) for any update to be definitive. The O'Reilly's "AppleScript in a
Nutshell", which takes things up to about OS 10.0.4, is officially
"approved" by Apple. i think it may even be "published in partnership" with
Apple, or something like that. It is evidently meant to be in lieu of an
official Guidebook for now. i imagine it will get a second edition in due
course, too. we've also been promised a new, much more complete guidebook
for AS Studio soon.
I hope that when things really settle down in a year or so, we also get an
official Guidebook for the New World of AppleScript in OS X, and for
scriptable Apple apps. But let's wait until they fix those: writing a
Guidebook chapter for TextEdit right now, would be quite embarrassing, for
example. Maybe we'll even get System preferences scriptable! Who knows? But
waiting somewhat longer for such things to take place, plus Unicode bugs
fixed, missing Finder features implemented, etc. makes good sense, IMO. Now
is not the right moment for an update.
--
Paul Berkowitz
_______________________________________________
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.