[Pythonmac-SIG] Re: 2.3b2-b BuildApplet droplets not recognized as apps

Paul Berkowitz berkowit at silcom.com
Mon Jul 14 11:25:32 EDT 2003


On 7/14/03 8:21 AM, "Russell E. Owen" <rowen at cesmail.net> wrote:

>> On Saturday, Jul 12, 2003, at 12:54 America/New_York, Chris wrote:
>> 
>>> ..Your dock problem has to do with Type.
>>> It should be set to "APPL" in your applet if you want the dock to
>>> take it. The creator type does not matter in this case....
> 
> Thank you both very much. It hadn't occurred to me that the dock could
> possibly care about creator and type because I thought Apple was moving
> away from relying on those. I have licenses for two different shareware
> programs that will fix this (XRay and FileBuddy), but very much
> appreciate the other suggestions -- including the Python code--  to make
> this change.
> 
> Presumably I can use similar Python code to get to the file creator (a
> question I raised earlier but the topic got diverted before I ever got
> an answer as to how to get and set that date).

I don't suppose you'd be interested in a one-line AppleScript that can do
the same thing?

    tell application "Finder" to set file type of file "HD:Folder:file" to
"APPL"

The way to get the colon-delimited path from a POSIX path is:

    set colonPathFile to POSIX file "/folder/file"

and then you wouldn't need 'file' in the Finder command:

    tell application "Finder" to set file type of (POSIX file
"/folder/file") to "APPL"

You can set the creator type the same way if you wish:

    tell application "Finder" to set creator type of (POSIX file
"/folder/file") to "myTP"


Or in one go:

    tell application "Finder"
        tell (POSIX file "/folder/file")
            set {file type, creator type} to {"APPL", "myTP"}
        end tell
    end tell



-- 
Paul Berkowitz




More information about the Pythonmac-SIG mailing list