The following escape-sequences extend the normal range of sequences (the normal sequences define the behavior of ZOC depending on the chosen each emulation).
Their main purpose of the extended sequences is to allow a host to control specific features or invoke specific actions through ZOC.
The sequences typically start with ESC ] (hex 1B 5D) or ESC [ (hex 1B 5B), followed by a variable part and a termination character like ^G (hex 07) or CR (hex 0D).
Other characters in the syntactic samples below denote themselves, except for spaces (which should be ignored) and text in brackets (which is a placeholder for a variable part of your own choice).
For example, a valid implementation of the sequence ESC ] 0 ; <title> ^G is the byte series hex 1B 5D 30 3B 5A 4F 43 07 (set window title to "ZOC").
On most Linux systems, you could emit the sequence from the example above via echo -e "\e]0;ZOC\a". On programming languages that use C-like strings (C, C++, Python, Perl, PHP, …), you can use something like print "\033]0;ZOC\007";.
Change Window Title: ESC ] 0 ; <title> ^G | |
The sequence allows the remote program to change the title for the window (or tab) in which the session runs.
| |
Change Window Title (alternate): ESC [ | $ t = <title> CR | |
The sequence is an alternate version of the above and also allows
the remote program to change the title of the window.
| |
Clear Screen and Reset Emulation: ESC ] R | |
A byte sequence of hex 1B 5D 52 will perform a clear screen and emulation reset (this is identical
to the user choosing Clear Screen from the View menu).
| |
Change Window Title: ESC ] 52 ; c ; <base64-data> ^G | |
The OSC52 sequence allows the remote program to put text to the clipboard according to the OSC 52 protocol
(requires activation of the 'Start Local Command', see below).
| |
Start Local Command: ESC [ | <command> CR | |
A host can send this sequence to perform a command locally through ZOC. Important:Since this is a potential security risk, the sequence is ignored, unless the option to allow it is set in the Options→Session Profile→Advanced. Alternately, the sequence is also processed, if a file named remoterun.flg exists in the ZOC program folder (Windows) or if a file named .zoc8_remoterunflag exists in the user's home folder (macOS). The command is passed to Windows through the CreateProcess API and it can contain optional parameters, e.g. notepad.exe newfile.txt or through a cmd.exe C:\Windows\system32\cmd.exe /c dir >out.txt. Under macOS you can run programs directly (/bin/touch /tmp/didit.txt). Tasks which require shell features (e.g. output redirection), will need to run through a shell e.g. /bin/bash -c ls ~/Downloads >/tmp/out.dir or through shell as a shell script /bin/bash /Users/you/thetask.sh If the command parameter starts with https://, https:// or ftp://, the URL will be passed to user's the default web browser. If the command starts with the text %SHELLOPEN% followed by a space character and a file name, the file will be opened through the operating system using the user's chosen default program, e.g. %SHELLOPEN% C:\ZOC\piechart.jpg
There are also some placeholders: DOWNLOADDIR, LASTDOWNLOADEDFILE, LASTSPOOLFILE. | |
NetTerm Compatibility: ESC [ ] <parameter> ESC [ <n> * | |
ZOC supports a range of sequences from NetTerm to perform operations on the local computer that runs the terminal. The parameter <n> is a decimal number which determines the function to perform. The meaning of the <parameter> thus depends on <n> as described below:
0 - URL to open in the local browser, e.g. ESC [ ] https://www.emtec.com/ ESC [ 0 *. 17 - The text DELETE. The last downloaded file will be deleted. Example: ESC [ ] C:\DOWNLOADS ESC [ 6 * (hex 1B 5B 5D 43 3A 5C 44 4F 57 4E 4C 4F 41 44 53 1B 5B 36 2A will subsequently (for this session only) store downloaded files in the folder C:\DOWNLOADS\. Example: ESC [ ] C:\DOWNLOADS\REPORT.PDF ESC [ 12 * will open the file REPORT.PDF on the local computer, using the default viewer for PDF files. Example: ESC [ ] ^RUN=postprocess.zrx ESC [ 2 * will run the postprocess.zrx REXX script. Example: ESC [ ] NOWAIT ESC [ 12 * will open the last downloaded file (e.g. MYREPORT.PDF) on the local computer, using the default viewer for PDF files.
|
← Zurück zu ANHANG