function foo(input){
//print(input.func.argsmap(1)) // eror: Subscript out of range (0x800a0009)
//print(input.func.argsmap[0]) // nothing is printed on script log
print(input.func.argsmap[1]) // same as above
if (input.func.argsmap.count) // always prints 1 not matter how many space delimited words i provide to "foo"
print(1)
else
print(0)
}
what I want to do is get whatever words are provided to my command for example, with foo one two three, I want to get one, two, three
I tried following the Map article but I have not had any luck. Also the forum doe not have past questions pertaining to this.
I assume we're talking about a script command here, which is then calling foo and passing it a ScriptCommandData object. If so, see the ScriptCommandtemplate member for how to define your command's argument names and template.
If you're still unsure, search the forum for argsmap and it finds at least once example of how it's used: