Benches macOS

3

An error of type -10661 has occurred

apple Verified

Imported from the Apple Support Forums via the Wayback Machine 🔗

I have created a Applscript App (Application Bundle) from 10.5.8 It is not working fine when I run in Snow Leopard-10.6.x machine: An error of type -10661 has occurred.

Can you throw some light around this error message?

Note:
The app is with GUI Scripting, File read/write and Folder Creation.

3 replies

Sign in or join Beachball Help to reply.

  1. 0

    Apple Support Community member

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Hello

    Error -10661 = kLSExecutableIncorrectFormat

    Defined in :
    /System/Library/Frameworks/ApplicationServices.framework/Frameworks/LaunchServic es.framework/Headers/LSInfo.h.

    I don't know why it bites your app.

    Take a look at the following thread, where the error was said to be caused by HFS Plus Case-sensitive format AND the usage of 'MacOs' intead of 'MacOS' in the executable's path.

    http://www.cocoabuilder.com/archive/cocoa/239941-need-help-suggestions-with-weir d-problem.html

    Good luck,
    H

  2. 0

    Apple Support Community member

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Thanks Hiroto,

    I have run the script instead of my App in snow leopard and found the following error:

    Events Log:

    error "Can’t make "Macintosh:Folder:FileName.html" into type file specification." number -1700 from "Macintosh:Folder:FileName.html" to *file specification*

    I read somewhere that snow leopard deprecated _*file specification*_ is this the problem?

    -Mowri

  3. 0

    Apple Support Community member

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Hello Mowri,

    Well, I think that the 'file specication' problem is another story and is not the cause of error -10661 because kLSExecutableIncorrectFormat is to be thrown BEFORE the script is run.

    ---
    As for 'file specification' (typeFSS), it has been deprecated under OSX.
    Perhaps 10.6 has finished it.

    Instead you can use 'POSIX file' (typeFileURL) or 'file' (typeFile) for both existing and non-existing file system object. And 'alias' (typeAlias) for existing file system object.
    (Note that 'file' (typeFile) cannot be used by itself for some reason but only in conjunction with command.)

    For example, if you're using 'file specification' for 'open for access' command such as -


    set hfspath to "HFS:path:to:new file"
    set fss to hfspath as file specification -- # 'file specification' (typeFSS) is deprecated
    open for access fss with write permission

    you may use 'file' such as -


    set hfspath to "HFS:path:to:new file"
    --set f to hfspath as file -- # you cannot do this for some reason
    --set f to file hfspath -- # NG either
    open for access file hfspath with write permission -- # 'file' (typeFile) is OK in command parameter

    or 'POSIX file' such as -


    set posixpath to "/POSIX/path/to/new file"
    set furl to posixpath as POSIX file -- # 'POSIX file' (typeFileURL) is OK
    open for access furl with write permission

    Hope this may help,
    H

    Message was edited by: Hiroto (fixed typo)