I'm running a javascript via Applescript, and I want to return a value back to the calling applescript. When I try the following test:
tell application "Adobe Illustrator"
set theScript to "return 'Test';"
set theResult to do Javascript theScript
end tell
I get a message "'Illegal 'return' outside of a function body".
Is there a way to return a value back to the applescript?