Kompozer android app11/20/2022 ![]() "C:\Program Files\teraterm\ttpmacro.exe" "D:\My Kownhow\TTL\test.ttl"Ĭonnect '172.28.92.23/ssh/auth=password/user=root/passwd=password'Įxecute the bat file to run the ttl script. Try to write the script as concise and short as possible so that it is easy to change when the style changes. In places where the execution is relatively slow, such as when connecting to a machine, please add the pause command. Please clear the test environment for the last part of the script so that the next ttl script can be executed. The Log file name specified in different ttl scripts cannot be repeated. Note Click the same as above for other commands such as if, then, elseif, else, endif, goto, etc. Waitln: (waiting for the entire line of matching strings to appear) waitln Remarks: Pauses until a line which contains one of the character strings is received from the host, or until the timeout occurs. Timeout=1/ The value after the equal sign is an integer, if it is set negative, it will wait indefinitely/ The timeout setting command is as follows: Note: To use this command, you need to set the timeout time, and the return result of the command is saved in the resault variable. For example: the command to press the Tab key is send #9 wait :(Waiting for the matching string to appear) wait Remarks: Pauses until one of the character strings is received from the host, or until the timeout occurs. If is an integer, its lowest-order byte (0-255) is regarded as an ASCII code of the character, and the character is sent to the host. If is a string, the string is sent to the host. Send: (send command) send …Remarks: Causes Tera Term to send characters to the host. To learn TTL quickly, study the sample macro files in the distribution package and the command reference. Sendln …Remarks: Causes Tera Term to send characters followed by a new-line character to the host. Tera Term Language (TTL) Tera Term Language (TTL) TTL is a simple interpreted language like BASIC. Commands that may be used when creating test items Sprintf2 filename'%s/Show_candidate_config _%s.log' mdir timestrĬ. You can also bring execution time,įor example: Show_candidate_config_ 20110426-130939.log Note: It is best to set the filename to the command name, and do not repeat if the ttl script fails. Write log through logopen/logclose commands Record the entire operation process through the log, and finally confirm the test result by comparing the log. ![]() Note: Specify parameter 0 after disconnect, so that no confirmation box will pop up.ī. Note: where username is the user name and passwd is the password Realized by TTL connect/disconnect commandĬonnect '192.168.137.27/ssh/auth=password/user=username/passwd= passwd' ![]() Connect and disconnect the machine where the PFC is located through Tera Term The creation of the script is relatively simple, I won't say anything, I will briefly introduce a few commands that are basically used.Ī. Please refer to the help file of Tera Term for the naming list and related introduction of TTL scripts. ![]() Getpassword 'password.Note that to install Tera Term, all components need to be selected. ![]() Getpassword 'password.dat' 'ios-base' pwd1 It will then ssh to each IP address it has found and will issue 3 commands: terminal length 0, show run and logout and save the output to a text file called yyyymmdd-ios-configs.txt where yyyymmdd is the date you ran the macro. of your operating system, you need to create this directory for the script to work. It will also scan an encrypted password file called password.dat (don't create this file manually - when you run the macro the 1st time it will ask you for the passwords once and automatically create this file thus you won't be asked again for the device passwords unless you remove this file). ' remotefile '/pub/tsg/teraterm/ttssh14.zip'. Basically it scans a seperate text file (called IPaddresses.txt - you'll need to create this text and simply put the IP addresses of the devices you want to connect to). Below is a macro I developed for Tera Term. ![]()
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |