Re: [NTLK] Re - PackType

From: James Elliott (rootbeeraddict_at_yahoo.com)
Date: Fri Oct 12 2001 - 17:40:27 EDT


I also use an AppleScript of my own design. Mine is not as complex
as yours, but you made a reference to "Classic", so I am assuming
that this has to do with using OS X. Am I right?

Robert Benschop <rbenschop_at_mac.com> wrote:
>on 11-10-2001 11:51, Steve Weyer at weyer_at_kagi.com wrote:
>
> > no particular prowess or even programming with PackType -- it's just a
> > trivial little droplet created with FileTyper.
>
>Packtype did the job for me for years, without a problem but I guess
>something in my system changed (and I tried to correct all of the settings
>in both the File Exchange and the Internet control panels, to no avail) and
>it doesn't do the job for me anymore.
>Instead I now use a little Applescript, thanks to Bill Davis that does it
>just as elegantly, for whoever needs it:
>
>on open (flist)
> tell application "Finder"
> repeat with theFile in flist
> if kind of theFile is not "folder" then
> try
> set oldDelims to AppleScript's text item delimiters
> set AppleScript's text item delimiters to "."
>
> set theType to last text item of ((file theFile) as
>string)
>
> if (theType = "pkg") then
> set file type of file theFile to "pkg "
> set creator type of file theFile to "1NCU"
> end if
> set AppleScript's text item delimiters to oldDelims
> on error
> set AppleScript's text item delimiters to oldDelims
> end try
> end if
> end repeat
> end tell
>end open
>
>
>
>Paste this in the script editor and save it as a Classic Applet and it does
>the job just as wonderful as PackType.
>
>
>Robert Benschop

The James Elliott Newton Site:
http://www.geocities.com/rootbeeraddict/newton.html
Is that a Newton in your pocket, or are you happy to see me?

--
This is the Newtontalk mailinglist - http://www.newtontalk.net
To unsubscribe or manage: visit the above link or
	mailto:newtontalk-request_at_newtontalk.net?Subject=unsubscribe



This archive was generated by hypermail 2.1.2 : Thu Nov 01 2001 - 10:02:01 EST