sindresorhus / run-applescript

Run AppleScript and get the result
MIT License
136 stars 15 forks source link

Support for scripts that returns an array? #4

Open AngryKiller opened 6 years ago

sindresorhus commented 6 years ago

PR welcome :)

AngryKiller commented 6 years ago

I found this to encode JSON in AppleScript: https://github.com/mgax/applescript-json But I have an error only when I run the code with run-applescript:

Error: 881:882: syntax error: « then », etc. planned but unknown token found. (-2741)

The code is working fine in the script editor. (I added the code of applescript-json inside of my applescript file.)

AngryKiller commented 6 years ago

My script is also not working when I run it from osascript -e. I'm gonna search how the Script Editor runs the scripts..

AngryKiller commented 6 years ago

I FOUND THE PROBLEM!: My script works when I run it without the -e parameter in osascript!