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

Re: [MacPerl] Default page



Jay Bedsole wrote:
>Rene' wrote:
>
>> Save your template to a file. In the Finder select "Get Info" on
>> the file. Enable "Stationary Pad". If you double click on the
>> file, the Finder will create a copy for you and open it in MacPerl.
>> I'm not sure wether the 7.5.5 Finder supports "Stationary Pad".
>
>I actually tried this earlier under OS 7.6 and MacPerl (v5.2.0r4)
>[...]
>expected. So my question for Rene' is this: what OS and MacPerl
>versions are you running such that it works for you?

In OS 8, Apple provided a new way for the Finder to interact with 
non-stationery-aware applications.  Before that time, the Finder 
was supposed to prompt the user for a new file name - I believe 
through the standard file dialogs (it's been quite a while).  In 
OS 8 and later, it merely makes a copy of the stationery file and 
tells the application to open it.  (This, of course, assumes 
that Finder is the app being told to open the file.)

I would think a simple AppleScript like:

tell application "MacPerl"
    activate
    make new document
    set Spot 1 of document 1 to "#!/usr/bin/perl
"
end tell

would do the trick nicely for you, without the use of stationery files.

-Charles 
 <albrecht@gate.net>



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch