チケット #43159

Allow macro language to set window foreground and background color

登録: 2021-11-04 05:40 最終更新: 2021-11-04 21:37

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

詳細

To benefit test systems that use macros to operate (for example to run certain commands on electronics being manufactured), it could be helpful to be able to change the overall screen foreground/background color of the TeraTerm window using macro commands. For instance, during a test, the screen could have a blue background. But when a test is done, it could change to green or red for pass or fail. This would help get an operator's attention to come over to the tester and do something.

I have not explored if I can get special terminal control codes to achieve this result, but it would be nice if special characters were not required to be transferred in case that interfered with colors sent by the remote system.

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

2021-11-04 05:40 更新者: mbendzick
  • 新しいチケット "Allow macro language to set window foreground and background color" が作成されました
2021-11-04 21:37 更新者: doda
コメント

You can use dispstr command with OSC control string.

e.g.

bg_red = #$1B"]11;#ff0000"#$1B"\"
fg_green = #$1B"]10;#00ff00"#$1B"\"
reset_color = #$1B"]110;111"#$1B"\"
 
dispstr bg_red fg_green
 
pause 5
 
dispstr reset_color
 
pause 5
 
; Use sprintf2 command to generate a change color control string.
osc_base = #$1B"]%d;#%02x%02x%02x"#$1B"\"
sprintf2 fg_black   osc_base 10 $00 $00 $00
sprintf2 fg_red     osc_base 10 $ff $00 $00
sprintf2 fg_green   osc_base 10 $00 $ff $00
sprintf2 fg_yellow  osc_base 10 $ff $ff $00
sprintf2 fg_blue    osc_base 10 $00 $00 $ff
sprintf2 fg_magenta osc_base 10 $ff $00 $ff
sprintf2 fg_cyan    osc_base 10 $00 $ff $ff
sprintf2 fg_white   osc_base 10 $ff $ff $ff
 
sprintf2 bg_black   osc_base 11 $00 $00 $00
sprintf2 bg_red     osc_base 11 $ff $00 $00
sprintf2 bg_green   osc_base 11 $00 $ff $00
sprintf2 bg_yellow  osc_base 11 $ff $ff $00
sprintf2 bg_blue    osc_base 11 $00 $00 $ff
sprintf2 bg_magenta osc_base 11 $ff $00 $ff
sprintf2 bg_cyan    osc_base 11 $00 $ff $ff
sprintf2 bg_white   osc_base 11 $ff $ff $ff
 
dispstr fg_white bg_black
pause 1
dispstr bg_red
pause 1
dispstr bg_green
pause 1
dispstr bg_yellow
pause 1
dispstr bg_blue
pause 1
dispstr bg_magenta
pause 1
dispstr bg_cyan
pause 1
dispstr bg_white
pause 1
 
dispstr reset_color

添付ファイルリスト

添付ファイルはありません

編集

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