User Guide/STX Console: Difference between revisions
No edit summary |
No edit summary |
||
Line 61: | Line 61: | ||
====LS → Display a directory listing==== | ====LS → Display a directory listing==== | ||
LS [path1 .. [pathN]] [options] | LS [''path1'' [ .. [''pathN'']] [''options''] | ||
Display a directory listing using the pathX arguments as a wildcard file/pathname mask. | Display a directory listing using the pathX arguments as a wildcard file/pathname mask. | ||
;Options: | ;Options: | ||
* /Recursive: recursive listing of all subdirectories | * '''/Recursive''': recursive listing of all subdirectories | ||
* /Long: use the long listing format to display file details, otherwise only the file name is listed | * '''/Long''': use the long listing format to display file details, otherwise only the file name is listed | ||
* /Path: display the full path name of files | * '''/Path''': display the full path name of files | ||
* /Directories: list directories only | * '''/Directories''': list directories only | ||
* /Files: list files only | * '''/Files''': list files only | ||
* /More: stop listing every ''n'' and wait for user input (enter or escape) | * '''/More''': stop listing every ''n'' and wait for user input (enter or escape) | ||
;Notes: | ;Notes: | ||
Line 81: | Line 81: | ||
SETCON ''parName'' ''parValue'' | SETCON ''parName'' ''parValue'' | ||
Assign ''parValue'' to the Console parameter ''parName''. The following Console parameters | Assign ''parValue'' to the Console parameter ''parName''. | ||
The following Console parameters are defined: | |||
* '''stackSize''': Set the maximum number of commands to be stored in the history. The ''parValue'' must be an integer number greater than 1. | * '''stackSize''': Set the maximum number of commands to be stored in the history. The ''parValue'' must be an integer number greater than 1. | ||
* '''moreLines''': Set the number of lines used as pagesize if the ''/More'' option is speciefied in a Console command. The ''parValue'' must be an integer number greater than 1. | * '''moreLines''': Set the number of lines used as pagesize if the ''/More'' option is speciefied in a Console command. The ''parValue'' must be an integer number greater than 1. | ||
Line 88: | Line 90: | ||
====SHOW → Display attributes and data of any shell-item or variables==== | ====SHOW → Display attributes and data of any shell-item or variables==== | ||
Note: The option '''/More''' can be applied to any <code>SHOW</code> command to stop the output after every '''moreLines''' lines (see <code>SETCON</code>). | |||
SHOW STACK | SHOW STACK | ||
Line 102: | Line 106: | ||
SHOW [''itemtype''] [/Summary] | SHOW [''itemtype''] [/Summary] | ||
Display the names of all shell items (no argument) or of shell items of the specified ''itemtype''. | Display the names of all [[Programmer_Guide/Shell_Items|shell items]] (no argument) or of shell items of the specified ''itemtype''. | ||
* '''/Summary''': show only the number of shell items per displayed itemtype | * '''/Summary''': show only the number of shell items per displayed itemtype | ||
Line 108: | Line 112: | ||
SHOW SPUCODES [''mask''] [/Summary /Long] | SHOW SPUCODES [''mask''] [/Summary /Long] | ||
SHOW CLASSES [''mask''] [/Summary /Long] | SHOW CLASSES [''mask''] [/Summary /Long] | ||
List the names of all loaded macros or spu's. If the argument ''mask'' is specified, only the matching names are listed. In the long list format of classes the class-name and the parent-class is displayed. | List the names of all loaded [[Programmer_Guide/Source_code#Definition of Macros|macros]] or spu's. If the argument ''mask'' is specified, only the matching names are listed. In the long list format of classes the class-name and the parent-class is displayed. | ||
* '''/Summary''': display only the number of macros / spu's. | * '''/Summary''': display only the number of macros / spu's. | ||
* '''/Long''': use the long list format | * '''/Long''': use the long list format | ||
Line 120: | Line 124: | ||
* '''/Invert''': inverts the meaning of the argument '''mask'''; display '''not''' matching variables names. | * '''/Invert''': inverts the meaning of the argument '''mask'''; display '''not''' matching variables names. | ||
* Note: use the normal {{STX}} syntax '''$'''''varname''''' to use a variable in a console command. | * Note: use the normal {{STX}} syntax '''$'''''varname''''' to use a variable in a console command. | ||
SHOW ''pathname'' /Textfile|Xmlfile [/Dialog] | |||
Write the content of the textfile or xmlfile ''pathname'' to the console window or display it in a separate window if the option /Dialog is supplied. | |||
====STS → Load, run and debug scripts==== | ====STS → Load, run and debug scripts==== |
Revision as of 11:49, 22 January 2016
The Console is a command line interface to an STx shell. It can be started from the Script Controller or the menu entry "Run > BScript" of the log window.
- The Console can
- process commands on a line by line basis
- process multiple commands pasted from the clipboard
- maintain a command history; you can use the up/down keys to navigate to commands and the tab key for command completion
- The Console cannot
- process STx control commands like IF, FOR, DO, WHILE, BREAK and CONTINUE
Contents
- 1 Special Commands implemented by the Console Application
- 1.1 CD → Get or Set the current working directory
- 1.2 CLEAR → Clear console window or command history
- 1.3 EXIT → Close the Console window
- 1.4 LOG → Write text into the console window
- 1.5 LS → Display a directory listing
- 1.6 SETCON → Display or set Console parameter values
- 1.7 SHOW → Display attributes and data of any shell-item or variables
- 1.8 STS → Load, run and debug scripts
- 1.9 STX → Start an STx application
- 1.10 USE → Load a console extension package
Special Commands implemented by the Console Application
CD → Get or Set the current working directory
CD [dir]
Set the current directory to dir and display the full path of the current directory. Without an argument, only the current directory is shown. result: the full path of the selected directory or an empty string if the command fails
CD /diropt
Set the current directory to the path selected by the option diropt:
/Work
: STx working directory/Root
: STx program or installation directory/Script
: default STx script directory/Dialog
: select the current directory in a dialog
result: the full path of the selected directory or an empty string if the command fails or it was canceled
CLEAR → Clear console window or command history
CLEAR WINDOW
Clear the console window.
CLEAR STACK CLEAR HISTORY
Clear the command history.
- Notes
- The command
CLS
is an alias forCLEAR WINDOW
- The result of the command
CLEAR
is always an empty string
EXIT → Close the Console window
EXIT
Close the Console window. The command history and the console settings are saved automatically. The Console application is also terminated, if the command window can be closed with the mouse or a hotkey.
LOG → Write text into the console window
LOG textline1 [.. textlineN]
Write the arguments to the console window. If not option is specified, each argument is written to a separate line. The option /Append can be used, to place all arguments in one line.
- Notes
- Normally LOG is not often used in the command line, because the result and the output of all commands is written to the console window anyway.
LS → Display a directory listing
LS [path1 [ .. [pathN]] [options]
Display a directory listing using the pathX arguments as a wildcard file/pathname mask.
- Options
- /Recursive: recursive listing of all subdirectories
- /Long: use the long listing format to display file details, otherwise only the file name is listed
- /Path: display the full path name of files
- /Directories: list directories only
- /Files: list files only
- /More: stop listing every n and wait for user input (enter or escape)
- Notes
- The command
DIR
is an alias for theLS
SETCON → Display or set Console parameter values
SETCON [parName]
Display all Console parameters (no parName given) or the parameter parName
SETCON parName parValue
Assign parValue to the Console parameter parName.
The following Console parameters are defined:
- stackSize: Set the maximum number of commands to be stored in the history. The parValue must be an integer number greater than 1.
- moreLines: Set the number of lines used as pagesize if the /More option is speciefied in a Console command. The parValue must be an integer number greater than 1.
- font: Assign a new console window font and/or change the fontsize. The parValue can define the new fontname (newname), the fontsize (:newsize) or both (newname:newsize). The fontname must be the name of an installed font and fontsize must be an integer number in the range 6 to 20. The new font is applied to the console window on the next start of the Console application.
- logMsg: Turn extended Console log messages on or off.
SHOW → Display attributes and data of any shell-item or variables
Note: The option /More can be applied to any SHOW
command to stop the output after every moreLines lines (see SETCON
).
SHOW STACK SHOW HISTORY
List the command history.
SHOW SHELLS
List the shell-id and application name of all running STX shells.
SHOW SOUNDFILES [/Long /Summary]
Display a list of all currently loaded soundfiles.
- /Summary: show only the number of loaded soundfiles
- /Long: display details also, not only the soundfile path
SHOW [itemtype] [/Summary]
Display the names of all shell items (no argument) or of shell items of the specified itemtype.
- /Summary: show only the number of shell items per displayed itemtype
SHOW MACROCODES [mask] [/Summary /Long /Noclass] SHOW SPUCODES [mask] [/Summary /Long] SHOW CLASSES [mask] [/Summary /Long]
List the names of all loaded macros or spu's. If the argument mask is specified, only the matching names are listed. In the long list format of classes the class-name and the parent-class is displayed.
- /Summary: display only the number of macros / spu's.
- /Long: use the long list format
- /Noclass: hide macros defining a class
SHOW VARIABLES [mask] [/Global|Shell|User /Invert]
List the names of all variables defined in the selected environment. If the argument mask is specified, only the matching names are listed.
- /Global: global variables (visible anywhere in STx)
- /Shell: shell variables defined and used by the console script
- /User: shell variables defined and used by the user during the console session
- /Invert: inverts the meaning of the argument mask; display not matching variables names.
- Note: use the normal STx syntax $varname to use a variable in a console command.
SHOW pathname /Textfile|Xmlfile [/Dialog] Write the content of the textfile or xmlfile pathname to the console window or display it in a separate window if the option /Dialog is supplied.
STS → Load, run and debug scripts
STX → Start an STx application
STX appname [appargs]
USE → Load a console extension package
- See also