function lib_getargs_hta(id) {
//return an array of unquoted arguments from the command line.
//we either want non quote stuff ([^"]+) surrounded by quotes or we want to look-ahead, see that the next character isn't a quoted argument, and then grab all the non-space stuff this will return for the line: "foo" bar the results "\"foo\"" and "bar"
var args = id.commandLine.match(/((?!"([^"]+)")\b(\S+)\b|"([^"]+)")/g)
//unquote the quoted arguments:
var argv = new Array()
for(var i=0;i1)
alert(args)
return(0)
}
function extractArgs(str) {
//return an array of unquoted arguments from the command line.
//we either want non quote stuff ([^"]+) surrounded by quotes or
//we want to look-ahead, see that the next character isn't a quoted argument,
//and then grab all the non-space stuff this will return for the line: "foo"
//bar the results "\"foo\"" and "bar"
var matches = str.match(/((?!"([^"]+)")\b(\S+)\b|"([^"]+)")/g)
//unquote the quoted arguments:
var args = new Array()
for(var i=0;i