This document is a work-in-progress. We would like to hear from users and programmers who have ideas and suggestions. Please contact us at: support@april.se.
The following information applies both when running Janita as an applet in a web browser and as an application.
To determine the version or platform information use the following escape sequences. The returned values are followed by a return (CR) character in order to simplify reading them into a program or script.
ESC [ 2 3 y or ESC [ 2 3 ; 0 y
This returns the Java version followed by the word Java. It always returns 4 numbers, appending zeros as appropriate. This is defined as System.getProperty("java.version").
For example: 1.4.0.0 Java or 1.4.1_01 Java
Note that AniTa for Windows returns the Windows version followed by Win32. For example: 4.10 192.0 Win32
This returns the AniTa version. It always returns 3 numbers.
For example: 1.2.0
This returns the AniTa version. It always returns 4 numbers.
For example: 1.2.0.1
This returns the operating system name.
This is defined as System.getProperty("os.name").
For example: Windows 98 or Linux
This returns the operating system version.
This is defined as System.getProperty("os.version").
For example: 4.10 or 2.4.20-8
This returns the operating system architecture.
This is defined as System.getProperty("os.arch").
For example: x86 or i386
This runs the program specified.
For example: ESC [ 1 y N O T E P A D SP C : \ C O N F I G . S Y S ESC \
An example of a UNIX shell command that envokes a WINDOWS program that lists the PC c:\config.sys file:
echo "\033[1yNOTEPAD C:\0134CONFIG.SYS\033\0134\c"
An example of a UNIX shell command that envokes the WINDOWS FTP program together
with a command file that will be automatically run:
echo "\033[1yftp -s:c:\commands.cfg\033\0134\c"
If the emulator could be running on different platforms, it might be necessary to run the ESC [ 2 3 ; 1 0 y command first in order to return the operating system name, and thus determine the exact command line to send to AniTa.
Note: also supported by AniTa for Windows
This sets the cursor blink rate in milliseconds. It can be set to a value between 1 and 1000.
Setting a value outside of this range disables blinking.
For example: ESC [ 3 3 ; 7 5 0 y
Note: also supported by AniTa for Windows
This shows a message box.
The following numbers can be used for MESSAGE TYPE, to determine
the type of icon displayed:
The MESSAGE TEXT and TITLE are seperated by a vertical bar character.
The default MESSAGE TYPE is 2.
For example: ESC [ 4 3 ; 1 y T h e SP o u t p u t SP f i l e SP w a s SP w r i t e SP p r o t e c t e d ! | S a v e SP E r r o r . . . ESC \
This shows a keyin dialog box and allows the user to enter data.
The default MESSAGE TYPE is 1.
For example: ESC [ 4 4 ; 5 y E n t e r SP d a t a b a s e SP s e r v e r SP n a m e | C o n n e c t | < C R > | 1 0 . 0 . 0 . 6 | < E S C > C ESC \
This shows a Yes/No dialog box and returns the user's choice.
The default MESSAGE TYPE is 5.
For example: ESC [ 4 5 y S t a r t SP t h e SP m o n t h SP e n d SP p r o c e s s i n g | B a t c h SP J o b . . . | Y < C R > | N < C R > | X < C R > | J a | N e i n ESC \
The BUTTON TEXTs default to "Yes" and "No" for the currently configured language. So on a German system, the following would give the same result as above:
ESC [ 4 5 y S t a r t SP t h e SP m o n t h SP e n d SP p r o c e s s i n g | B a t c h SP J o b . . . | Y < C R > | N < C R > | X < C R > ESC \
The mouse can be configured to send a string to the host when it is clicked or dragged.
Different strings can be configured for single or double clicks with the right, left or middle buttons. The middle button is the wheel on some models. If the configured string is empty, the mouse will not send anything to the host.
If the mouse should send a string to the host on a drag then that string must include the %colup% and/or the %rowup% macros. The top left position of the drag is the location inside of the marked area. The bottom right position of the drag is always the location outside of marked area. Thus RIGHT = LEFT + WIDTH and BOTTOM = TOP + HEIGHT.
The keyboard shift state is that when the drag is completed.
Note: also supported by AniTa for Windows
If you have used the mouse click-drag-and-release together with %colup% and %rowup% then after the sequence has been sent to the host the screen area will still contain the select rectangle.
It is possible to use the %clearselect% macro
to turn off the selected area.
For example: ESC [ 3 1 y % C L E A R S E L E C T % ESC \
The following information only applies when running Janita as an application.
The host can set the unique part of the titlebar text.
For example: ESC [ 22 y A c c o u n t s SP P a y a b l e ESC \
An example of a UNIX shell command that does this:
echo "\033[22yFixed Assets\033\0134\c"
Note: also supported by AniTa for Windows
The following information only applies when running Janita as an applet in a web browser.
To redirect the web broswer to another page when running as an applet use the following escape sequences.
Note that if you need to do this when running as an application and not as an applet then you will need to start the web browser as a seperate program. See the section: Starting a Program on the Client. You might first need to determine the platform and version in order to decide the name and path of the browser. See the section. Version and Platform Information.
ESC [ 4 1 y WEB PAGE ADDRESS ESC \
This causes the web browser to go to a new web page address.
For example: ESC [ 4 1 y h t t p : / / w w w . a p r i l . s e ESC \
This specifies the target for all subsequent web page addresses. If not specified the target is "_blank".
For example: ESC [ 4 2 y m a i n ESC \ ESC [ 4 1 y h t t p : / / w w w . a p r i l . s e ESC \
It is possible to automatically redirect the web browser to another web page when the janita applet exits. This is done using the AppletExit configuration option.
See the user's guide for more details.