ZOC Online Help Topic:

Other Functions → User Defined Actions

User buttons, keyboard keys, auto-macros, idle action, and other events can be configured to perform functions such as sending text, initiating a connection, opening a document, etc. This dialog lets you choose actions and providing additional details about how to perform it.

 

Many of these choices are straightforward, but here are more details for the ones that are not:

       
Send text to remote computer
 

The text to send can include control codes from the list shown in List of Control Codes. For example, the text can contain ^M for Enter or ^I for Tab or ^Z for the Enter/Submit button in a TN3270 emulation.

(Note: For emulation keys that have no control code equivalent you can use the 'Send a mixture of text and emulation-specific keys' action instead).

Send a mixture of text and emulation-specific keys
 

This function is useful in cases where it is necessary to send combinations of text and special emulation keys that do not have a control code equivalent.

The parameter to this action is text to send, but it can also contain the name of emulation-specific keys which can appear in angled brackets. For example, in this action Hello world!<Enter> is the equivalent of Hello world!^M in the Send text to remote computer action, but this format is more flexible because you can use all the available named emulation keys, as in <Home>submit<F3>save<Enter>.

Note: if you need to send actual < and EXMP(>) signs, you can use <lt> and <gt> as placeholders for these, e.g. diff -u file1.dat file2.dat <gt>files.diff<Enter> will send diff -u file1.dat file2.dat >files.diff followed by the Enter key.

Send a single emulation-specific key
 

This action sends a specific emulation key, such as the VT220 Do key or the TN3270 Insert key. It is mainly intended for simple cases where you merely want to map an emulation function, like the TN3270 PA1 key, to a key or key combination on your local keyboard. You can find the names of the keys for each emulation by clicking the '&threedots;' button next to the key entry field or in the Names of Emulation Keys for User-Defined Actions section of this help text.

(Note: To send multiple emulation keys or a combination of normal text and emulation keys, use the Send a mixture of text and emulation-specific keys action instead).

Perform a function from ZOC's main menu
 

It is also possible to perform the function from the main menu (e.g., to map it onto a button or different key combination). This is achieved by entering the name of the menu function into the action field or by selecting the function by clicking the '…'-button.

Connect to a host using a host directory entry
 

To connection to hosts which are stored in the host directory, specify the name of the host directory entry or choose it from the host directory via the '…'-button.

Connect to a given address via specific communication method
 

This action initiates a connection that is not listed in the host directory. The parameter is in the format <connection type>!<destination>, where the connection type is one of the types shown in the session profile while the destination depends on the connection type (e.g., for a Secure Shell connection, it will be an IP address or host name and port, for a Unix Pipe it would take the form a a file name, etc.). Examples are Secure Shell!joe@nowhere.com, Secure Shell!harry:secret123@hogwarts.com:10022, Telnet!3270.mainframe.com:10023, Serial/Direct!COM5, etc.

Run a REXX script in the current tab
 

To start a REXX script from a key or button you will enter the name of the script file in the action field, e.g., script\myscript.zrx and click on the button that tells the assistant that the text in the field is the name of REXX script to run.

 

 
← Back to Other Functions