Tera Term Macro Examples

Tera Term Macro Examples 5,0/5 1600 reviews

Restores Tera Term if is greater than zero.6 disconnect' Example: connect 'host1' open a Tera Term window and link TTPMACRO to it unlink terminate the link connect 'host2' open another Tera Term window and link TTPMACRO to it.1.

Inputbox inputbox Displays a dialog box prompting user to input a string. Inputbox [ []] Parameters string It is displayed in the dialog box. String It is displayed as the dialog box title. String (optional default='(empty)) The default string on edit control. Integer (optional default=0) If it is non-zero, following strings in is treated as spacial character.

Does not effect to. Input output ' ' n line feed t tab This option is obsolete.

You are recommended to use the strspecial command. Return Value System variable The string entered by the user is returned. Example inputbox 'Password:' 'Login' sendln inputstr See also •.

LogMeTT Tutorial LogMeTT Tutorial LogMeTT is a launcher application for TeraTerm -terminal emulator- macro. A user can automate login procedure to the remote host as well as running any process on the server. Berserk Though `TeraTerm Menu' is already available as auto-login application, LogMeTT has more feature than TeraTerm Menu. These features include SSH2 connection, scheduling, auto logging, color setup per the remote host and so on.

In addition, LogMeTT supports the tree repository per a macro file. LogMeTT author is living in USA.

LogMeTT has been included in TeraTerm package. A user can manage an automated connection to remote hosts by using LogMeTT.

Also a user can effectively administrate these configuration files because these host information can be registered as a tree repository. However, LogMeTT lacks the feature such as quick launching by keyboard shortcut which is supported by TeraTerm Menu. LogMeTT can be launched from File menu of TeraTerm. When it is activated, LogMeTT icon will appear in the notification area, far right of a taskbar.

We will explain LogMeTT configurations in this chapter. A user will realize an easy-to-use automated procedure using TeraTerm. Right-click LogMeTT icon in the notification area (see upper 3. Figure), and then select 'Configure.' Configuration dialog will appear. Click the 'Settings' tab, and then select the 'Run at log on to Windows' check box on the 'Settings' tab.

LogMeTT will be automatically launched immediately after logon to Windows. When 'Start logging' is checked on New Connections tab under Settings tab, auto logging will start by launching LogMeTT from TeraTerm macro (The log file is located in `TeraTerm installation directory Logs LogMeTT menu name_ timestamp.log'). Select 'Macro' tab, and then enter a description of macro script to login to the remote host. If you want User Name to be fixed and Password to be entered via dialog box, refer to the following macro script. Alternatively, you can directly write the user's password in the macro file although it is not recommended. *NOTICE* Refer to.

Username = 'nike' hostname = '192.168.1.3';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; msg = 'Enter password for user ' strconcat msg username passwordbox msg 'Get password' msg = hostname strconcat msg ':22 /ssh /auth=password /user=' strconcat msg username strconcat msg ' /passwd=' strconcat msg inputstr connect msg. Popup dialog can be used to confirm a notice when a user connects to an important host or a user switches the privilege level to the super user level. When a user presses OK button on the popup message, then the macro script will be run. Otherwise when a user presses Cancel button, then the macro script will be cancelled. On 'Colors' tab, a user can modify TeraTerm coloration for each connection. Like as Popup dialog, this tab can be used to change coloration. It prevents a user miss operation.

On 'Schedule' tab, a user can automatically run the macro script. By using this feature, a user can do as follows.

• Power cycle • Send e-mail or call upon failure by combination 'Settings' tab and 'User Data' tab. • Periodically backup or status check NOTICE: If a user puts a child tree in schedule, all parent tree will be run. If a user want to run it as an independent task, a child tree should be moved under 'This computer' top tree. Also, please be careful of the difference of timestamp between remote host and local host.

RECOMMENDATION: If a user utilizes scheduling feature, turn on auto-logging mode. This section is to discuss the topic about TeraTerm macro. Although the user name is directly described in the macro script in an example of Section 4, this is not appropriate for security policy. Therefore, a new procedure for encrypting the user name and the password is described below. Sample macro for auto-login with encrypting the user's password. The user name is scott, the host name is remote.host, and the destination of the password file is located in C: mydata filename.dat.; setting hostname = 'remote.host' username = 'scott' getpassword 'C: mydata filename.dat' 'usrpass' inputstr; connection & login msg = hostname strconcat msg ':22 /ssh /2 /auth=password /user=' strconcat msg username strconcat msg ' /passwd=' strconcat msg inputstr connect msg getpassword 'filepath filename' 'IDENTIFICATION' $stored variable A user can save the encrypted password with multiple identifications in a sample file. This macro script confirms the user password for the first time.