Created
March 13, 2016 17:47
-
-
Save uchcode/38e5e5ec83c9249234b5 to your computer and use it in GitHub Desktop.
JavaScript for Automation (JXA) Arguments example.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/osascript -l JavaScript | |
ObjC.import('Foundation') | |
const argv = $.NSProcessInfo.processInfo.arguments.js | |
argv.forEach(function(arg, idx) { | |
if( idx < 4 ) return | |
console.log( arg.js ) | |
}) | |
function run(argv) { | |
argv.forEach(function(arg, idx) { | |
console.log( arg ) | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment