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)