Re: NTLK Where to find a compressed Works? (kind of long)

From: Bill Davis (newton@ecity.net)
Date: Fri Jan 14 2000 - 02:39:28 EST


On 1/13/2000 10:56 AM, Leland Jory [mailto:ljory@newted.dyndns.org]
wrote:

>
>I'll try posting the text of the AppleScript in the near future, for those
>who might be interested.
>
>Leland Jory

I think I already posted one; check Victor Rehorst's searchable
NewtonTalk message archives.

Oh heck, here they are:

-- this one will files whose name ends in .pkg to NCU Package type and
creator

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

or

-- this sets ANY file dropped on it to NCU's type and creator code
(dangerous, but simpler)

on open (flist)
        tell application "Finder"
                repeat with theFile in flist
                        if kind of theFile is not "folder" then
                                set file type of file theFile to "pkg "
                                set creator type of file theFile to "1NCU"
                        end if
                end repeat
        end tell
end open

 - Bill

_____________________________________________________________________
 \\ /, "Ink Different" at Info-Newt, the site for Newton PDAs
`( Info-Newt Newton news & info web site: http://www.info-newt.com/
  \ Newton FTP Software archive: ftp://ftp.info-newt.com/
   = Newton Community FAQ: http://www.info-newt.com/faq/
             

******************************************
This month's NewtonTalk brought to you by:

EVOTE.COM, the ultimate Political Junkie site on the 'Net.

The Clinton Administration, the George Bush
2000 Campaign, and almost every other major
U.S. politician has said something nasty
about us at some time. Find out why at:
http://www.evote.com

******************************************

Need Subscribe/Unsubscribe info?
Visit http://www.planetnewton.com



This archive was generated by hypermail 2b29 : Tue Feb 01 2000 - 00:01:14 EST