Multi Commander > Script

Passing arguments to MC.Run

<< < (2/2)

Mathias (Author):

--- Code: ---function GetArgs()
{
  @var $args = "";
  @var $n;
  @var $a;
  for( $n = 1; $n < $argcount; $n = $n + 1 )
  {
       $a = $arg($n);
       $args += ' "' + $a + '"';
  }
  return $args;
}
--- End code ---

I change the loop a bit.  This will quote all of the args. If that was the issue
The script engine sometimes stopps appending when doing function call after anohter append.. I thinks a temp values are getting lost. Will check that.
 
Is would also be possible to write " \"" but using ' instead is easier, becuse you do not have to escape the "

espkk:
Works perfect! Thank you
(I was afraid putting arguments in quotes would force them to be passed with quotes too, but it works as required  :) )

Navigation

[0] Message Index

[*] Previous page

Go to full version