function collectCommandLineParameters() {
// see https://github.com/JXA-Cookbook/JXA-Cookbook/wiki/Shell-and-CLI-Interactions
var argv = []
var args = $.NSProcessInfo.processInfo.arguments  // NSArray
for (var i = 0; i < args.count; i++) {
argv.push(ObjC.unwrap(args.objectAtIndex(i)))
}