This is a basic javascript question: Is there a way for applescript.execString to return the output in a variable? Something like:
var script = 'tell application "Safari" to get URL of document 0';
var URL = applescript.execString(script, (err, URL) => {return URL});
console.log(URL)
Or, do I have to do all of my machinations inside the braces? In any case, thanks for writing this module!
This is a basic javascript question: Is there a way for
applescript.execStringto return the output in a variable? Something like:Or, do I have to do all of my machinations inside the braces? In any case, thanks for writing this module!