0
votes

I just added Applescript support to my application and I find that when I compile the Applescript running the command that has my application I get the error that appears in the title. The command is simple:

create task "Title for the task" date "Today" notes "Notes to the task."

After the error the editor places the cursor on the word task.

The funny thing is I've tested in my wife's Macbook, with Mountain Lion, and it works perfectly, but in mine, with Mavericks, no way.

Does anyone have any idea what may be failing, could be my system or in Mavericks I have to add or change anything?

Please, any ideas would me very well because I do not know where to go since I have already tried a lot of things and nothing.

Thank you very much.

1
It sounds like the AppleScript editor may be looking at an older version of your app and using that "dictionary" to compile the script. Try Open Dictionary… and locate the current version of your app.Smilin Brian
Tried, but still fails. thank you.Juan Miguel
I think there's something wrong with my system. Some time ago I did another query. And yet still fails, but works perfectly on my wife's macbook, and perhaps both problems are related.Juan Miguel

1 Answers

0
votes

The "Expected end of line but found " error indicates that there is something wrong with the syntax. But since the code works on other machines I assume that the dictionary won't be loaded properly.

Since Mavericks, or better said since AppleScript 2.3 there is the new use statement to indicate which framework, script libraries and scripting addition (on/off) should be used. You can even inform which Application and version should be used in your script. Maybe you aren't aware of this new feature in Mavericks. More info can be found in AppleScript Language Guide and then look for the use statement.