Name
GetRawArguments -- get all arguments passed to program (V10.0)
Synopsis
args = GetRawArguments()
Function
This function can be used to get all arguments passed to your program or script either via the console or via the host system's desktop manager. The arguments will be returned in the args table and won't be formatted in any way. They will be returned in their raw form as they were passed to your program or script. This means that the returned arguments may also include special arguments handled by Hollywood, e.g. "-window" or "-quiet".

Note that the first table entry will always contain the name of the program but this will not necessarily include a qualified path but just the name of the program as it was specified by the caller.

GetRawArguments() can be useful if your script should be capable of handling multiple file arguments. GetFileArgument() only allows you to get the very first file passed to your program and GetCommandLine() expects arguments to be formatted in a certain way which makes it impossible to use it to get al file arguments. GetRawArguments() allows you to get all file arguments because arguments are never formatted in any way but they are simply forwarded to your script without any modification by Hollywood.

Inputs
none

Results
args
all arguments in a table; the first entry in that table will contain the name of the program (not necessarily with its path)
Example
t = GetRawArguments()
DebugPrint("Program:", t[0])
For Local k = 1 To ListItems(t) - 1
   DebugPrint("Argument", k .. ":", t[k])
Next
The code above gets all arguments passed to the script and prints them.

Show TOC