GoFiler Legato Script Reference
Legato v 1.5b Application v 5.24b
|
Table of Contents | < < Previous | Next >> |
Chapter Sixteen — Application (continued)
GetCommandLineParameter Function
Overview
The GetCommandLineParameter function attempts to retrieve a command line argument using the built-in application command line parse object.
Syntax/Parameters
Syntax
string = GetCommandLineParameter ( string name, [int index] );
Parameters
name
A string containing the name of the argument. Parameter names are not case-sensitive.
index
An optional zero-based int specifying the sub item for a series of parameters. This only applies to the Open and InFile arguments.
Return Value
Returns a string containing the data associated with the parameter or an empty string on failure or if the parameter has no data associated with it. Because an empty string does not necessarily indicate an error, use the GetLastError function to determine if an error occurred.
Remarks
When running as an application, there are certain predefined arguments that can be accessed but may either have been processed or only allow certain data to be associated with the argument. All items are listed to indicate reserved keywords so that programmers do not use these values. These are as follows:
Name | Comment | ||
client | Reserved. Used for browser plug-in parameters. | ||
commandfile | Reserved. Used to pass large lists command line arguments to the application. The default max command line size is approximately 4,000 bytes. Using this parameter effecting extends the command line to 65,535 by placing data in an extension file. From the application and script standpoint, all parameters are accessed in the same manner without regard to the source. This parameter is not directly passed to the script. | ||
decode | Reserved. | ||
demo | Used to set certain demo modes. Always returns ‘demo’ if present. | ||
infile | Used to specify one or more input files. This is not processed by the GUI portion of the application but is used by certain API verbs. This is an index-referenced item. | ||
newinstance | Used to force the creation of a new application instance. Always returns ‘newinstance’ if present. | ||
nogui | Stops the GUI from opening. Always returns ‘NoGUI’ if present. | ||
noframe | Reserved. Always returns ‘noframe’ if present. | ||
nologo | Reserved. Always returns ‘nologo’ if present. | ||
nomenu | Reserved. Always returns ‘nomenu’ if present. | ||
openfile | Used to specify one or more files to open. This is an index-referenced item. | ||
openinfofile | Indicates that the caller asked for an Information View log file to be opened. | ||
openprojectfile | Indicates that the caller asked for a project file to be opened. A plain file open as a project type will also open a project. | ||
openmenu | Causes all ribbon and menu items to be available (not grayed). | ||
outfile | Specifies an output file for an API verb or script. | ||
parameterfile | Specifies a specific parameter file for an API verb or script. | ||
parameters | Specifies generic parameters for an API verb or script. | ||
preferences | Specifies a specific parameter file to be used for the application settings. | ||
progress | Reserved. Always returns ‘progress’ if present. | ||
project | Same as ‘openprojectfile’. | ||
result | Specifies a result file for an API verb or script. All progress and messages are automatically routed to the results file. | ||
runscript | Forces a script to be run. | ||
scriptparams | Reserved as a keyword protected for script parameters. The application does not process this item. |
Within Legato Basic, the above items are not predefined. In addition to the above, the API also has keywords that may be processed.
Note that if the script run is within the GUI and the running instance has received control from another instance, the command line parameters replace the existing instance parameters. Therefore, command line parameters should not be considered static or safe.
To retrieve the raw command line for specific or custom processing, use the GetCommandLine function.
Related Functions
Platform Support
Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL
Legato IDE
Table of Contents | < < Previous | Next >> |
© 2012-2024 Novaworks, LLC. All rights reserved worldwide. Unauthorized use, duplication or transmission prohibited by law. Portions of the software are protected by US Patents 10,095,672, 10,706,221 and 11,210,456. GoFiler™ and Legato™ are trademarks of Novaworks, LLC. EDGAR® is a federally registered trademark of the U.S. Securities and Exchange Commission. Novaworks is not affiliated with or approved by the U.S. Securities and Exchange Commission. All other trademarks are property of their respective owners. Use of the features specified in this language are subject to terms, conditions and limitations of the Software License Agreement.