![]() |
|||
|
|
|
Sample Code from AccuTerm 2K2 Advanced Features presentation at Spectrum 2007 The sample code shown during the "AccuTerm 2K2 Advanced Features" session presented at Spectrum 2007 is available for download from this page. The session description listed eight topics, however, due to time constraints, only six were covered. Sample code for the final two topics is also included on this page. |
|
|
|
|||
A topic on the AccuTerm support forum describes using the custexit.atsc script to modify the action of the menu Close and Exit items. To view this topic, click here.
A topic on the AccuTerm support forum describes this task: click here to view.
The process of creating a key pair for use with OpenSSH is described in the AccuTerm 2K2 Users Guide, page 36. Note that permissions for the public key must be set appropriately for OpenSSH to utilize the key. Specifically, you need a '.ssh' sub-directory in the user's home directory. The '.ssh' directory must restrict permissions to the owner only (chmod 700 .ssh). Within the '.ssh' directory, you need a text file called 'authorized_keys2', also with permissions restricted to the owner (chmod 600 authorized_keys2). The 'authorized_keys2' file contains all of the user's public SSH keys.
This topic was not presented separately, since the wED Editor was used extensively for many of the other topics.
The sample subroutine, ATMSGBOX, which builds and executes a VBA script to display a standard Windows message box, was described. This subroutine is included with the standard AccuTerm installation, and can be found in the C:\Program Files\Atwin\Samples\Pickbp folder. If the Sample subroutine library options is selected when installing the AccuTerm host programs, this subroutine can be found in the SAMPLES file.
AccuTerm supports two methods of adding mouse support to green-screen programs: pattern matching and direct mouse input. Pattern matching normally does not require any modification to the program, and uses a table to patterns that are matched to the screen area where the mouse click occurs. If a matching pattern is found, the action associated with the pattern is executed. Actions can include sending characters to the host, as if the user typed them, or executing simple scripts. The pattern files are simple text files, with tabs between fields: button <tab> pattern <tab> click action <tab> double-click action. Please refer to the Programmers Guide, page 282, for more information on the pattern "regular expression" syntax. A simple green-screen data entry program was used to illustrate this technique, where each field is displayed with a field number. The demo program also accepts 3 functions keys (save, delete, exit), so patterns are included to match the function key labels displayed on the screen. The field_number_fkey.txt file matches the field labels used in the mouse.demo1 program. The mouse.demo2 program is similar, except field labels have a period after the field number. The field_number_dot_fkey.txt file is used in this case. The pattern table should be saved in the C:\Program Files\Atwin folder, and the pattern file is specified in the Advanced section of the Miscellaneous settings (Tools->Settings->Misc->Advanced). The standard AccuTerm installation includes several other mouse pattern tables you can use. See the .MOU files in the C:\Program Files\Atwin folder. Direct mouse input requires the program to be modified to accept the mouse position from the "keyboard". An escape sequence is used to turn on or off the mouse. If the mouse is "on", clicking anywhere on the terminal screen sends a mouse click to the host program, similar to a pressing a function key. The mouse.demo3 program is similar to mouse.demo1, except that besides function keys, the program accepts the mouse click as well. To view the differences between the two programs, click here.
This topic was not presented in the Spectrum session, but a sample VB.NET project is available here.
This topic was not presented in the Spectrum session, but a sample project is available. The sample consists of 3 items: a green-screen data entry program, derived from the program used in mouse demos, a GUI project (GUIAPPS), and a BASIC subroutine (GUIBP). Use the FT utility to upload each of these to the appropriate file on the host. You can download the sample as a single zip file if desired. The data entry program has been modified to call the NOTES.DIALOG subroutine when the green-screen program needs input for field 12 (notes). You can call a GUI Dialog subroutine from either green-screen or GUI applications.
|
|||
|
© 2007 AccuSoft Enterprises All rights reserved. |
|||