[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Startup files
- To: angus@arti9.vub.ac.be
- Subject: Re: Startup files
- From: "Mark A. Tapia" <markt@dgp.toronto.edu>
- Date: Sat, 18 Jul 1992 13:27:08 -0400
- Cc: info-mcl@cambridge.apple.com
Angus McIntyre <angus%arti9.BITNET@cunyvm.cuny.edu> writes:
> If you have an application created by MCL (but subsequently given a
> different signature) is there a way for it to determine which document
> file(s) was/were double-clicked to launch it?
The new version of MCL2.0f has an example (binhex) which shows how
to retrieve the finder parameters.
(finder-parameters) which returns a list of the files that were
opened to indirectly launch the applications. The portions of the
list of interest have the format:
(:open file1 .... filen)
Here is the fragment that shows how to "parse" the finder-parameters:
(let ((file-list (finder-parameters)))
(when (eq (car file-list) :open)
(dolist (f (cdr file-list))
(let ((type (mac-file-type f)))
(if (eq type :text)
(binhex-decode f)
; this should never happen because binhex won't be the creator
; of any non-text files
(binhex-encode-get-outfile f))))))