View=>Command Window¶
This command opens the UniScript command window. In this window, you can carry out calculations and run UniScript functions.
UniScript Commands¶
The command window can be used to run a UniScript function:
m = matlab_load(GetRootDirectory() + "samples/map-data.mat");
To print the value of a variable type in the variable name and press enter:
m
[.
BEEWG = matrix 1 x 78 [1002.5, 461.7, 350.3, 322, 302.6, ...]
CO = matrix 1 x 78 [0.6, 0.08, 0, 0.05, 0.05, ...]
EWGLST = matrix 1 x 78 [1, 3.1, 5.2, 7.3, 9.4, ...]
_ = string-matrix 11 x 1 ["N", ...]
...
]
object (obj at 0x51DC554)
* m.BEEWG
1002.5000 461.7000 350.3000 322.0000 302.6000 319.9000 ...
Multiple functions must be separated by a semi-colon:
x = linspace(0, 2*PI, 100); y = sin(x); plot(x, y);
The output can be copied into the clipboard or can be displayed in an editor
using the dot command .clip
.
Dot Commands¶
UniPlot R2010 supports dot commands.
Note
Dot commands can only be used at the UniScript command prompt, not in programs.
Dot commands start with a dot. The command can be abbreviated, for example
instead of .help
you can type in .h
If the abbreviation is ambiguous
a list with all matching commands will be displayed.
|
Change directory. |
|
Clears the command window. |
|
Opens an editor with the clipboard content. |
|
Executes a DOS command. Example: |
|
Lists a directory. Example: |
|
The .edit command opens a UniScript function in an editor. Example: |
|
Opens the Windows-Explorer. Example: |
|
Opens a help topic. Example: |
|
Starts Lua. |
|
Quit UniPlot. |
|
Lists all handles of documents, datasets, drawing objects, etc. |
|
Runs a program. Example: |
|
Returns the UniPlot version string. |
|
Lists UniScript function names. Example: |
.cd
- change directory. The argument can be a drive or a folder. Entered
without an argument the command returns the current path name.
* .cd
d:\uniplot-build\main
* .cd d:
D:\uniplot-build
* .cd d:\
d:\
.clipboard
- If the clipboard contains text the command opens the text in a
UniPlot-Editor. Example: .clip
.cmd
- Executes a DOS command. Example: .cmd del uniplot.tmp
.
.dir
- Displays a list of files and subdirectories in a directory
(see also .cd
).
* .cd c:\uniplot
c:\uniplot
* .d
Volume in drive C has no label.
Volume Serial Number is 8834-48FF
Directory of c:\uniplot
31.05.2009 13:24 <DIR> .
31.05.2009 13:24 <DIR> ..
11.05.2009 09:46 <DIR> addin
11.05.2009 09:46 <DIR> autoload
11.05.2009 09:46 <DIR> bitmap
11.05.2009 09:46 <DIR> Formula
24.07.2009 11:34 <DIR> help
17.06.2009 12:32 <DIR> Program
11.05.2009 09:46 <DIR> samples
11.05.2009 09:46 <DIR> script
11.05.2009 09:46 <DIR> startup
22.06.2009 11:39 <DIR> template
06.07.2009 15:35 54.525 Uninstall.exe
1 File(s) 54.607 bytes
12 Dir(s) 25.147.686.912 bytes free
*
.edit
- Opens a UniScript function in an editor. Example:
.edit sinh
opens the file containing the sinh function.
.explorer
- Starts the Windows-Explorer. Example: .ex c:\
.
.help
- displays this page or another help topic.
Example: .help sin
. To open a help topic it is easier to place the cursor
in the function name and press F1.
.lua
- Starts Lua. exit
to return to UniScript.
Example:
* .lua
LuaJIT 2.1.0-beta1 -- Copyright (C) 2005-2015 Mike Pall. http://luajit.org/
JIT: OFF SSE2 SSE3 SSE4.1 fold cse dce fwd dse narrow loop abc sink fuse
UniPlot Lua interface v1.0 - Copyright (c) 2015 STS Software and Testing Solutions GmbH (http://www.uniplot.com)
Type 'exit' to return to UniScript
> a = rand(3,3)
> a
3x3
0.147248 0.0529661 0.607899
0.763069 0.146725 0.98715
0.261875 0.252775 0.872349
> exit
.quit
- Quits UniPlot.
.show
- Displays the handle values of all open documents, drawing objects
datasets, etc.
.system
- Runs a program. Example: .sys notepad d:\a.txt
.
.version
- Returns the UniPlot version string.
* .v
5.20.0 Date: Jan 23 2010 (x64)
The dot-commands are written in UniScript. See
script\uniscript\dot-cmds.ic
. Example command .clipboard
:
def _cmd_clipboard(s)
{
if (IsTextInClipboard()) {
sClip = GetClipboardText();
hEd = EdCreate();
EdSetText(hEd, sClip);
} else {
print "no text in clipboard";
}
}
The command starts with _cmd_
and has one string parameter. The parameter is
the text entered with the command.
Keyboard¶
To edit a command line, the following keys are supported:
- Ins
The Insert key switches between type over and insert mode.
- DEL
Deletes the character following the cursor position.
Backspace
- Arrow right, Arrow left
Moves the cursor one character to the right or the left.
- Enter
Executes the command line.
Executes the complete command no matter where the cursor in in the line.
- Arrow up, Arrow down
Toggles through the command history (last commands).
- F1
If the cursor is located a function name and F1 is pressed the help text for that function will be displayed.
- F7
Displays the command history list box. The Enter key copies the selected line into the command window.
- F8
Searches for an item in the command history. If the command line is empty, all other entries will be shown one after the other. If a command appears, only commands that start with the same characters will be shown.
- ESC
Deletes the command line.
1.) Aborts the current UniScript task. 2.) If the UniScript interpreter is idle the key clears the command line.
- Ctrl+C
1.) Aborts the current UniScript task. 2.) If the UniScript interpreter is idle: Copies the line containing the cursor to the clipboard.
- Ctrl+V
Inserts a text line from the clipboard to the command line.
- Shift+Insert
Copies the current line into the clipboard.
- Ctrl+Alt+C
Copies the complete contents of the command window into the clipboard.
- Ctrl+D
Removes the displayed command from the command history.
See also
id-1230994