Returns the command line arguments used when running the application EXE.
[ sCommandLine = ] Object.CommandLine
The CommandLine property syntax has the following parts:
Name |
Type |
Description |
Object |
AApp |
AApp control |
sCommandLine |
BString |
A string containing the parameters from the command line entered by the user to run the application executable file (.EXE). |
When running from the IDE the command line is set by the Project properties. If the executable is executed using a file shortcut, the CommandLine property may have come from a user's shortcut.
The following are predefined command line switches for ATEasy Executable (.EXE):
● /simulate - turn on simulation, similar to: App.Simulate=True.
● /noshowexception - turn off exception dialog when an exception occurs. This will suppress displaying the exception dialog.
Use the Trim function to trim spaces from both sides of the arguments.
The executable file name is not returned with the return value. Use the App.ModulePath to find out the executable.
To determine if the application is running from the IDE use the DebugLog variable.
For example if you call your executable:
abc.exe a.log
The App.CommandLine will return a string "a.log" and in your code you can use it as:
SaveLog(Trim(App.CommandLine))
The following example calls a user procedure to scan the command line parameters:
ScanCommandParams(App.CommandLine)
ModulePath, Simulate, ATEasy Exception Dialog, DebugLog, Trim, Split