Is there any way to examine the implementation of non-plugin KM action? Specifically I want to see how Execute a Shell Script and Execute a Java Script are implemented.
For a quick example of how you would run a JavaScript for Automation script just using the Execute Shell script:
osascript -l JavaScript <<JXA_END 2>/dev/null
function run() {
return 2 + 2;
}
JXA_END
With Python etc, the first experiment might be to draft and test in an environment like CodeRunner.app, and then launch from a shell script, using something like the pattern above.
1 Like
Short answer is no, there is no way, and the long answer is, they are surprisingly complicated which thankfully no one else has to deal with.
Pretty much all the execution (except JavaScript in browsers) is built on top executing a shell script in some form.