AppGetCommandLineΒΆ

AppGetCommandLine returns the command line.

ssCommandLine = AppGetCommandLine()

Return Value

ssCommandLine is a scalar string without the program name. For the command c:\program\uniplot\program\uniplot.exe /StartupFileName test.ic Para1 Para2 the function returns the string /StartupFileName test.ic Para1 Para2.

Example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
/*
   File my_startjob.ic

   Example:

   c:\program\uniplot\program\uniplot.exe /StartupFileName my_startjob.ic job.xml

   First load the standard startup file:
*/
load(GetRootDirectory() + "startup\\startup.ic");
// No load my script file:
ssDir = GetRootDirectory() + "myscript\\";
load(ssDir + "myscript.ic");
ssCommands = AppGetCommandLine();
if (ssCommands != "") {
    <svCommands, svType> = StringToField(ssCommands);
    if (len(svCommands) == 3) {
        ssJobFile = svCommands[3];
        // execute a function im myscript.ic
        _my_job_execute(ssJobFile);
    }
}

Comment

The following standard parameter are supported:

Name Description
/StartupFileName <file> Instead of the default startup file startup\startup.ic the given file is loaded, see Example. <file> is the complete UniScript file name.
/Ini Same as /StartupFileName.
/NoAutoLoad The files in the autoload directory are not loaded.
/IniFileName <file> Instead to the Windows-Registry (HKEY_CURRENT_USER\Software\RSB\UniPlot5) UniPlot will use an INI file the given file name to save settings (text file).
/User <user> If a user name is given the settings will be saved in the registry under the key HKEY_CURRENT_USER\Software\RSB\UniPlot5\<user> instead of HKEY_CURRENT_USER\Software\RSB\UniPlot5.
/automation If set, Uniplot will be started without displaying the main window. The splash screen will not be displayed. See also AppSetBatchMode.
/RegServer Obsolet. Will be executed during startup.
/UnRegserver Obsolet. Will be executed during uninstall.
/BatchMode Starts UniPlot in batch mode, see AppSetBatchMode.

The parameters are case insensitive.

The GetCommandLine function is the corresponding function in the UniScript-Interpreter (us.exe), see UniScript as a Stand-Alone Program.

History

Version Description
R2013.2 Description of standard parameter added.
3.0 New.

id-1720758