チケット #40866

TeraTerm 'disconnect' command unlinks MACRO (From Forum Message #86029)

登録: 2020-10-19 20:55 最終更新: 2020-12-07 17:43

報告者:
担当者:
(未割り当て)
チケットの種類:
状況:
完了
コンポーネント:
マイルストーン:
優先度:
5 - 中
重要度:
5 - 中
解決法:
動いてるけど?
ファイル:
3
投票
点数: 0
No votes
0.0% (0/0)
0.0% (0/0)

詳細

From Forum Help [#86029]

[forum: 86029]

I use a MACRO to connect to usb com ports. I have two issues with this:

A) If the com port i specify to connect with connect '/C=...' UPPON MACRO STARTUP does not exist, the .ttl script will terminate and close... (why? i dont want that). Alternatively, is there a way to list all available usb com port devices and THEN try to connect to each of those?

B) After connecting to a COM port, using the command 'disconnect 0' or 'disconnect 1', the MACRO closes/terminates. (How can i terminate the connection to the host (COM port) only, without terminating Teraterm?)

//=====================================================================

;Code that disconnects my macro when trying to connect to a port that does not exist, UPPON MACRO STARTUP:

;both com-ports 3 and 6 are available for connection. The others are not.

timeout = 4

connect '/C=1' ;this disconnects my MACRO. I dont want it to disconnect my macro.

wait 'never'

dispstr 'END'

//==============================================================

;Code that closes my link to MACRO when using the 'disconnect command:

;both comport 3 and 6 are available for connection. The others are not.

timeout = 4

connect '/C=3' ;this connects as normal.

wait 'never'

disconnect 0 ;this closes my TeraTerm (I dont want it to close my teraTerm

wait 'never'

dispstr 'TT is still active'

wait 'never'

dispstr 'END'

チケットの履歴 (13 件中 3 件表示)

2020-10-19 20:55 更新者: basilisvirus
  • 新しいチケット "TeraTerm 'disconnect' command closes TeraTerm window (From Forum Message #86029)" が作成されました
2020-10-19 21:38 更新者: nmaya
コメント

When the connection type is TCP/IP, "Auto window close" setting affects close or not close Tera Term window.

But when the connection type is Serial, Tera Term is not closed. It is a specification.

(A) 'connect' macro command do 2 actions.

It is written in command help. https://ttssh2.osdn.jp/manual/4/en/macro/command/connect.html

  • runs Tera Term with <command line parameters>
  • links it to MACRO

After connect '/C=...' failed, Tera Term is not connected to serial port, but Tera Term is alive. The link between MACRO and Tera Term is alive too.

To close linked Tera Term, call 'closett' macro command.

Or you can reuse linked Tera Term. To connect different remote host (serial port), call 'connect' macro command.

(B) Not reproduced in my environment.

'disconnect' macro command does not close Tera Term window.

Thanks,

2020-10-19 23:14 更新者: basilisvirus
  • 詳細が更新されました
  • 概要が更新されました
コメント
(このコメントは削除されました)
2020-10-19 23:15 更新者: basilisvirus
  • 詳細が更新されました
2020-10-19 23:17 更新者: basilisvirus
コメント

Thank you, i re-stated my ticked Details. Can you check it again? I am more specific not to the problem. I am also attaching the .INI file for you to make a better test.

2020-10-19 23:18 更新者: basilisvirus
  • 詳細が更新されました
2020-10-20 00:17 更新者: nmaya
コメント

My test script behaves as expected in my env.

In my env with your TERATERM.INI, my script behaves as expected too.

What about in your env?

2020-11-21 00:16 更新者: nmaya
  • 解決法なし から 動いてるけど? に更新されました
  • 重要度9 - 最高 から 5 - 中 に更新されました
  • 優先度9 - 最高 から 5 - 中 に更新されました
2020-12-07 17:42 更新者: basilisvirus
コメント

Solved it. It was my bad, but i never figured out what i did wrong.

I also made an open-source project on the code i wanted to use it for: https://gitlab.com/Basilisvirus/teraterm-desired-com-port-detection

Thank you for your help!

2020-12-07 17:43 更新者: basilisvirus
  • 状況オープン から 完了 に更新されました

添付ファイルリスト

編集

ログインしていません。ログインしていない状態では、コメントに記載者の記録が残りません。 » ログインする