AppleScript combined with app.doscript() gives a permission error
Hi all,
We are trying to get an argument using applescript and following code gives us an error. The thing I should emphasize is, this error only occurs when our plugin is installed. (My company develops a InDesign plugin and this piece of code doesn't even interact with our scripting functions). I checked our script providers and all the related implementation. Couldn't find something that blocks AppleScript. Other applescript that we call through same mechanism, doesn't have this problem. Only this "item 1 of argument" part. Any pointer would be helpful.
Code:
function functionName(ourInputArg) {
var inputArg = [ourInputArg];
var myAppleScript = 'do shell script "echo " & item 1 of arguments'
app.doScript(myAppleScript, ScriptLanguage.APPLESCRIPT_LANGUAGE, inputArg, UndoModes.FAST_ENTIRE_SCRIPT, "undo AppleScript");
}Error:

