SYSTEM
SYSTEM
The SYSTEM
commands allow you to execute Windows system commands. The SYSTEMCALL
variants works their SYSTEM
counterparts, except that they return warnings rather than errors on failure.
SYSTEM
Start the windows command shell.
SYSTEM command arguments
SYSTEMCALL command arguments
Execute a system command or program, and wait for the process. The (numeric) exit code of the program is stored in the shell variable XRC
.
SYSTEMX command arguments
SYSTEMCALLX command arguments
Start a system command or process, and continue shell execution (do not wait for process). The windows program id of the started process is stored in the shell variable XRC
.
If a program (.EXE) is executed, it is called directly without starting a windows shell. For the identification of the windows shell and for the program file search, the settings of the windows environment are used (COMSPEC, PATH, ...).
HELP
SYSTEM HELP chmFile htmlTopic
Open a topic in an HTML Help file using the Windows HtmlHelp API.
- chmFile
- The compiled HTML file (e.g. '
stx help.chm
')
- htmlTopic
- The HTML topic to call (e.g. '
526.htm
').
SYSTEM HELP CLOSE
Close the HTML Help file, if it is open.
SYSTEM HELP INDEX searchString [ helpFile ]
Search the help index. Open up the specified help file, activating the index tab and insert the search string. If no help file is specified, the default STx help file is used (stored in @HELPFILE
).
- searchString
- The string to search for.
- helpFile
- The help file to search. If no help file is specified, the help file specified by the user in the STx Configuration Settings Dialog in the user settings is used.
SYSTEM HELP KEYWORD searchString [ helpFile ]
Search up the specified help file for a keyword matching the search string. If no help file is specified, the default STx help file is used ($@HELPFILE). You can search for multiple keywords by specifying separating them using a sem-colon (e.g. dataset;edit).
Note that searchString is still one argument (surround in quotes to be safe). Note also that the modular file containing the keyword is opened, rather than the master file.
- searchString
- The string to search for.
- helpFile
- The help file to search. If no help file is specified, the help file specified by the user in the STx Configuration Settings Dialog in the user settings is used.
SYSTEM HELP SEARCH searchString [ helpFile ]
Open up the specified help file, activating the search tab and inserting the search string. Note that the search does not take place. Press return to search. If no help file is specified, the default STx help file is used (stored in @HELPFILE
).
- searchString
- The string to search for.
- helpFile
- The help file to search. If no help file is specified, the help file specified by the user in the STx Configuration Settings Dialog in the user settings is used.
MKDIR
SYSTEM MKDIR directoryPath
Creates the directory specified by directoryPath. If directoryPath is relative, it is relative to the @WORK
directory. If multiple directories in directoryPath do not exist, they are all created.
Note that you can use the shell FILE
item to check whether a directory exists.
You can retrieve the present working directory with the command PWD
.
system mkdir '\\server1\public\data\output\$#var' system mkdir 'd:\data\output\$#var' system mkdir 'output\$#var'
OPEN
SYSTEM OPEN doc
Use the registered windows application to open the file/document doc. This command is useful to open text document with the right text processor or to display HTML pages with the default browser application.
SYSTEM OPEN app doc
Use the specified windows application app to open the file/document doc.
Neither type of OPEN
subcommands waits for the Windows application. The macro execution continues after the command has been sent to the Windows system.
The OPEN
subcommand can also be used to send e-mails (SYSTEM OPEN 'MAILTO:.....') or to jump to a bookmark on a HTML page (SYSTEM OPEN 'HTTP:...').
If there is an error using the OPEN
subcommand (e.g. if no application is registered for the document type), the error is not processed internally and not returned to the macro!====RMDIR====
SYSTEM RMDIR directoryPath
Removes the directory specified by directoryPath. Only the last directory is removed (e.g. if directoryPath is 'new1\new2
' then only the directory 'new2
' is removed.