This command opens the UniScript command window. In this window, you can carry out calculations and run UniScript functions.
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.
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.
| .cd | Change directory. |
| .clear | Clears the command window. |
| .clipboard | Opens an editor with the clipboard content. |
| .cmd | Executes a DOS command. Example: .cmd del uniplot.tmp. |
| .dir | Lists a directory. Example: .dir d:\ /os |
| .edit | The .edit command opens a UniScript function in an editor. Example: .edit EdCreate |
| .explorer | Opens the Windows-Explorer. Example: .ex c:\ |
| .help | Opens a help topic. Example: .help sin. |
| .quit | Quit UniPlot. |
| .show | Lists all handles of documents, datasets, drawing objects, etc. |
| .system | Runs a program. Example: .sys notepad d:\a.txt. |
| .version | Returns the UniPlot version string. |
| .what | Lists UniScript function names. Example: .what *sin* |
.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.
.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 = SynEdCreate();
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.
To edit a command line, the following keys are supported:
Backspace
Executes the command line.
Executes the complete command no matter where the cursor in in the line.
Displays the command history list box. The Enter key copies the selected line into the command window.
Deletes the command line.
1.) Aborts the current UniScript task. 2.) If the UniScript interpreter is idle the key clears the command line.
See also
id-1230994