Getting command line parameters


I am trying to use the system.commandline but I am struggling to work out how to split it out into an array and to strip out so that I only have the parameters and nothing else. I am sure it is not difficult but I am struggling to see the best way to do this.

Anyone have any examples of how best to do this.


wouldn’t it just be

dim v() as string = split(system.commandline," ")
v.remove 0

and whats left is the “arguments”

I will give it a try but I dont think so because I am passing in multiple paths to files and the paths can contain spaces.

Check out @Jeremy Cowgar 's OptionParser.

Thanks everyone that really helps.

with MBS Xojo Plugins?

Application.ArgumentsMBS as String()

that gives an array with arguments for all platforms.