[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Creating Files



At 18:32 96.04.03, Tanya Quinn wrote:
>         Reply to:   RE>[MacPerl] Creating Files...
>
> Hi,
> You probably want to use one of the MacPerl extensions, MacPerl'Choose which
> put up a file selector.  Here's an example,
> $myfile = &MacPerl'Choose(&GUSI'AF_FILE, 0, "Save to this file" , "",
> &GUSI'CHOOSE_NEW + &GUSI'CHOOSE_DEFAULT,   "mydefaultname");

or even more easily,

        require 'StandardFile.pl';
        $myfile = &StandardFile::PutFile("Save to this file");


Furthermore, you can also set the type and creator of this file with

        &MacPerl::SetFileInfo($CREATOR, $TYPE, $myfile);

After getting $myfile.  I use

        &MacPerl::SetFileInfo('R*ch', 'TEXT', $myfile);

To set the creator to BBEdit usually.

Dan the MacPerl Newbie (now in 3rd day of use!)