Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
nmaya committed Jun 6, 2024
1 parent ce198ae commit 0b7c2ab
Show file tree
Hide file tree
Showing 11 changed files with 243 additions and 0 deletions.
1 change: 1 addition & 0 deletions manual/5/en/about/history.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ <h3 id="teraterm_5.3">YYYY.MM.DD (Ver 5.3 not released yet)</h3>
<li>Download folder setting is moved to <a href="../menu/setup-additional-general.html#DownloadFolder">General tab</a> of Additional settings dialog.</li>
<li>Modified to <a href="../setup/teraterm-ssh.html#AuthBanner">display SSH authentication banner in VT window</a> regardless of receiving character code.
<li>Keyboard setting dialog is moved to Keyboard tab of Additional setting dialog.</li>
<li>MACRO: <a href="../macro/command/send.html">send</a> macro command check data and sends it as text or binary. added <a href="../macro/command/sendtext.html">sendtext</a> and <a href="../macro/command/sendbinary.html">sendbinary</a> macro command</li>
</ul>
</li>

Expand Down
2 changes: 2 additions & 0 deletions manual/5/en/macro/command/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,15 @@ <h2>Communication commands</h2>
<li><a href="scprecv.html">scprecv</a> (version 4.57 or later)
<li><a href="scpsend.html">scpsend</a> (version 4.57 or later)
<li><a href="send.html">send</a>
<li><a href="sendbinary.html">sendbinary</a> (version 5.3 or later)
<li><a href="sendbreak.html">sendbreak</a>
<li><a href="sendbroadcast.html">sendbroadcast</a> (version 4.62 or later)
<li><a href="sendfile.html">sendfile</a>
<li><a href="sendkcode.html">sendkcode</a>
<li><a href="sendln.html">sendln</a>
<li><a href="sendlnbroadcast.html">sendlnbroadcast</a> (version 4.62 or later)
<li><a href="sendlnmulticast.html">sendlnmulticast</a> (version 4.96 or later)
<li><a href="sendtext.html">sendtext</a> (version 5.3 or later)
<li><a href="sendmulticast.html">sendmulticast</a> (version 4.62 or later)
<li><a href="setbaud.html">setbaud</a> (version 4.58 or later)
<li><a href="setdebug.html">setdebug</a> (version 4.64 or later)
Expand Down
6 changes: 6 additions & 0 deletions manual/5/en/macro/command/send.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ <h2>Remarks</h2>
If &lt;data&gt; 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.
</p>

<p>
The datas are checked, and when data is judged to be text, data is sent in same as "<a href="sendtext.html">sendtext</a>"; when data is judged to be binary, data is sent in same as "<a href="sendbinary.html">sendbinary</a>".
<p>

<h2>Example</h2>

<pre class="macro-example">
Expand Down Expand Up @@ -73,6 +77,8 @@ <h2>Example</h2>
<h2>See also</h2>
<ul>
<li><a href="sendln.html">sendln</a></li>
<li><a href="sendtext.html">sendtext</a></li>
<li><a href="sendbinary.html">sendbinary</a></li>
<li><a href="../syntax/formats.html">Formats of constants</a></li>
</ul>

Expand Down
45 changes: 45 additions & 0 deletions manual/5/en/macro/command/sendbinary.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>sendbinary</title>
<meta http-equiv="Content-Style-Type" content="text/css">
<link rel="stylesheet" href="../../style.css" type="text/css">
</head>

<body>


<h1>sendbinary</h1>

<p>
Sends binary data. <em>(version 5.3 or lator)</em>
</p>

<pre class="macro-syntax">
sendbinary &lt;data1&gt; &lt;data2&gt;....
</pre>

<h2>Remarks</h2>

<p>
Causes Tera Term to send characters to the host.<br>
If &lt;data&gt; is a string, the string is sent to the host. <br>
If &lt;data&gt; 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.
</p>

<p>
Data sent by ttpmacro.exe is received by ttermpro.exe and sent as is. Character encoding of the string type is UTF-8, strings are sent in UTF-8. Use g<a href="sendtext.html">sendtext</a>h to convert character code.
</p>

<h2>See also</h2>
<ul>
<li><a href="send.html">send</a></li>
<li><a href="sendln.html">sendln</a></li>
<li><a href="sendtext.html">sendtext</a></li>
<li><a href="../syntax/formats.html">Formats of constants</a></li>
</ul>

</body>
</html>
44 changes: 44 additions & 0 deletions manual/5/en/macro/command/sendtext.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>sendtext</title>
<meta http-equiv="Content-Style-Type" content="text/css">
<link rel="stylesheet" href="../../style.css" type="text/css">
</head>

<body>


<h1>sendtext</h1>

<p>
Sends text data. <em>(Version 5.3 or lator)</em>
</p>

<pre class="macro-syntax">
sendtext &lt;data1&gt; &lt;data2&gt;....
</pre>

<h2>Remarks</h2>

<p>
Causes Tera Term to send characters to the host.<br>
If &lt;data&gt; is a string, the string is sent to the host. <br>
If &lt;data&gt; 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.
</p>

<p>
String sent by ttpmacro.exe is received by ttermpro.exe, converted to character code and sent. Use "<a href="sendbinary.html">sendbinary</a>" to send without conversion.
</p>

<h2>See also</h2>
<ul>
<li><a href="sendbinary.html">sendbinary</a></li>
<li><a href="send.html">send</a></li>
<li><a href="../syntax/formats.html">Formats of constants</a></li>
</ul>

</body>
</html>
1 change: 1 addition & 0 deletions manual/5/ja/about/history.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ <h3 id="teraterm_5.3">YYYY.MM.DD (Ver 5.3 not released yet)</h3>
<li>ダウンロードフォルダの設定を Additional settings の <a href="../menu/setup-additional-general.html#DownloadFolder">General タブ</a>へ移動した。</li>
<li><a href="../setup/teraterm-ssh.html#AuthBanner">SSH認証バナーをVT ウィンドウ内に表示する</a>時、受信文字コードによらず表示できるよう変更した。</li>
<li>キーボード設定ダイアログを Additional settings の Keyboard タブへ移動した。</li>
<li>MACRO: <a href="../macro/command/send.html">send</a> マクロコマンドは送信データを判定してテキスト又はバイナリとして送信する。<a href="../macro/command/sendtext.html">sendtext</a><a href="../macro/command/sendbinary.html">sendbinary</a> マクロコマンドを追加した。</li>
</ul>
</li>

Expand Down
2 changes: 2 additions & 0 deletions manual/5/ja/macro/command/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,15 @@ <h2>通信コマンド</h2>
<li><a href="scprecv.html">scprecv</a> (バージョン 4.57以降)
<li><a href="scpsend.html">scpsend</a> (バージョン 4.57以降)
<li><a href="send.html">send</a>
<li><a href="sendbinary.html">sendbinary</a> (バージョン 5.3以降)
<li><a href="sendbreak.html">sendbreak</a>
<li><a href="sendbroadcast.html">sendbroadcast</a> (バージョン 4.62以降)
<li><a href="sendfile.html">sendfile</a>
<li><a href="sendkcode.html">sendkcode</a>
<li><a href="sendln.html">sendln</a>
<li><a href="sendlnbroadcast.html">sendlnbroadcast</a> (バージョン 4.62以降)
<li><a href="sendlnmulticast.html">sendlnmulticast</a> (バージョン 4.96以降)
<li><a href="sendtext.html">sendtext</a> (バージョン 5.3以降)
<li><a href="sendmulticast.html">sendmulticast</a> (バージョン 4.62以降)
<li><a href="setbaud.html">setbaud</a> (バージョン 4.58以降)
<li><a href="setdebug.html">setdebug</a> (バージョン 4.64以降)
Expand Down
6 changes: 6 additions & 0 deletions manual/5/ja/macro/command/send.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ <h2>解説</h2>
&lt;data&gt; が整数型の場合は、その値の下位バイト(0-255)を ASCII コードとみなし、その文字を送信させる。
</p>

<p>
送信データは内容を判定して、文字と判定した場合 "<a href="sendtext.html">sendtext</a>" と同様に送信、バイナリと判定した場合 "<a href="sendbinary.html">sendbinary</a>" と同様に送信する。
<p>

<h2></h2>

<pre class="macro-example">
Expand Down Expand Up @@ -72,6 +76,8 @@ <h2>例</h2>
<h2>参照</h2>
<ul>
<li><a href="sendln.html">sendln</a></li>
<li><a href="sendtext.html">sendtext</a></li>
<li><a href="sendbinary.html">sendbinary</a></li>
<li><a href="../syntax/formats.html">定数の形式</a></li>
</ul>

Expand Down
44 changes: 44 additions & 0 deletions manual/5/ja/macro/command/sendbinary.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>sendbinary</title>
<meta http-equiv="Content-Style-Type" content="text/css">
<link rel="stylesheet" href="../../style.css" type="text/css">
</head>

<body>


<h1>sendbinary</h1>

<p>
バイナリを送信する。 <em>(バージョン 5.3以降)</em>
</p>

<pre class="macro-syntax">
sendbinary &lt;data1&gt; &lt;data2&gt;....
</pre>

<h2>解説</h2>

<p>
&lt;data&gt; が文字列型の場合、文字列をホストへ送信させる。<br>
&lt;data&gt; が整数型の場合は、その値の下位バイト(0-255)を ASCII コードとみなし、その文字を送信する。
</p>

<p>
ttpmacro.exe が送信したデータは、ttermpro.exe が受信して、そのまま送信する。文字列型の文字コードはUTF-8なので、文字列はUTF-8で送信される。文字コードを変換する場合は "<a href="sendtext.html">sendtext</a>" を使用する。
</p>

<h2>参照</h2>
<ul>
<li><a href="send.html">send</a></li>
<li><a href="sendln.html">sendln</a></li>
<li><a href="sendtext.html">sendtext</a></li>
<li><a href="../syntax/formats.html">定数の形式</a></li>
</ul>

</body>
</html>
43 changes: 43 additions & 0 deletions manual/5/ja/macro/command/sendtext.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>sendtext</title>
<meta http-equiv="Content-Style-Type" content="text/css">
<link rel="stylesheet" href="../../style.css" type="text/css">
</head>

<body>


<h1>sendtext</h1>

<p>
テキストを送信する。 <em>(バージョン 5.3以降)</em>
</p>

<pre class="macro-syntax">
sendtext &lt;data1&gt; &lt;data2&gt;....
</pre>

<h2>解説</h2>

<p>
&lt;data&gt; が文字列型の場合、文字列をホストへ送信させる。<br>
&lt;data&gt; が整数型の場合は、その値の下位バイト(0-255)を ASCII コードとみなし、その文字を送信する。
</p>

<p>
ttpmacro.exeが送信した文字列は、ttermpro.exe が受信して、設定された文字コードに変換して送信する。変換せずに送信する場合は "<a href="sendbinary.html">sendbinary</a>" を使用する。
</p>

<h2>参照</h2>
<ul>
<li><a href="sendbinary.html">sendbinary</a></li>
<li><a href="send.html">send</a></li>
<li><a href="../syntax/formats.html">定数の形式</a></li>
</ul>

</body>
</html>
49 changes: 49 additions & 0 deletions manual/5/ja/reference/dev/macro_proto.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@

# Macro Protocol

## XTYP_EXECUTE

- command
- command definitions are in[teraterm/common/ttddecmnd.h](https://github.com/TeraTermProject/teraterm/blob/c7ce43608e0e2844e148b88cfadb9a96cebaba01/teraterm/common/ttddecmnd.h#L31)
- ttpmacro -> ttermpro
- packet length limit is MaxStrLen

| pos | len | Description |
|-----|-----|-------------|
| 0 | 1 | command |
| | N | data |

- command (CmdSendUTF8String/CmdSendBinary/CmdSendCompatString)

| pos | len | Description |
|-----|-----|------------------------|
| 0 | 1 | command |
| 1 | 4 | length(little endian) |
| 5 | N | data(string or binary) |


## XTYP_POKE

- data(text and binary)
- ttpmacro -> ttermpro

## XTYP_REQUEST

- ttpmacro <- ttermpro
- Item "DATA"
- text or binary
- Item "PARAM"
- ファイル名的な?
- 通信の応答


## DDE(DDEML) WIN32 APIs

- DdeAccessData()
- ハンドル(HDDEDATA)から先頭のポインタとサイズを取得できる
- DdeUnaccessData()
- DdeAccessData() した物を解除する
- DdeGetData()
- ハンドル(HDDEDATA)のデータをワークにコピーする
- 戻り値が実際のサイズ

0 comments on commit 0b7c2ab

Please sign in to comment.