How to execute pre-defined JavaScript function in AppleScript and pass data to JavaScript
Compose the JavaScript string using the concatenation operator in AppleScript.
&quot;loadKeys(&quot; &amp; keys &amp; &quot;)&quot;

This will run the JavaScript loadKeys(key1,key2,key3).