2014年1月18日土曜日

Tera Term(テラターム)のマクロサンプル

;set the server to connect inputbox 'input server name:' 'server name:' server = inputstr ;set user and password user= 'xxx' passwd = 'xxx' ;set log file path filename = 'C:¥xxx¥xxx' ;IP mapping strcompare server 'hostname1' if result = 0 then srvip= 'xxx.xxx.xxx.xxx:23 /telnet' goto CONN endif ; ... ... ;start connect :CONN connet srvip wait 'login: ' sendln user wait 'Password: ' sendln passwd ;set title titile = 'connect ' strconcat title server settitle title ;open log file getdate date gettime time strcopy time 1 2 hour strcopy time 4 2 min strcopy time 7 2 sec strconcat filename server strconcat filename '_' strconcat filename hour strconcat filename min strconcat filename sec strconcat filename '.log' logopen filename 0 1

0 件のコメント:

コメントを投稿