Tuesday, April 3, 2018

Adding AppleScriptObjC to Existing Scripts

Shane Stanley:

The script runs fine (assuming you have a file called Test.txt on your Desktop), until you uncomment the use framework line, after which you get the error: “Can’t make current application into type file.” That’s not very helpful.

The solution is to change the code so you build file references using coercions.

In other words, as alias instead of using a string that represents a path. I usually use POSIX file "path", and that also works.

Comments RSS · Twitter

Leave a Comment