svnno****@sourc*****
svnno****@sourc*****
2017年 7月 24日 (月) 23:13:46 JST
Revision: 6877 http://sourceforge.jp/projects/ttssh2/scm/svn/commits/6877 Author: doda Date: 2017-07-24 23:13:46 +0900 (Mon, 24 Jul 2017) Log Message: ----------- いくつかのマクロコマンドで、SendCmnd() で WaitFlag を指定 ⇒ Tera Term 側で EndDdeCmnd() で無理やり終了というおかしな事をやっていたので修正。 対象マクロコマンド: ・sendbroadcast ・sendlnbroadcast ・sendmulticast ・sendmulticastname ・scpsend ・scprecv Tera Term 側ですぐに終了する(待つ必要の無い)コマンドの場合は、SendCmnd() の WaitFlag に 0 を指定して下さい。 Modified Paths: -------------- trunk/teraterm/teraterm/ttdde.c trunk/teraterm/ttpmacro/ttl.c -------------- next part -------------- Modified: trunk/teraterm/teraterm/ttdde.c =================================================================== --- trunk/teraterm/teraterm/ttdde.c 2017-07-24 14:13:42 UTC (rev 6876) +++ trunk/teraterm/teraterm/ttdde.c 2017-07-24 14:13:46 UTC (rev 6877) @@ -862,8 +862,6 @@ static HMODULE h = NULL; char msg[128]; - //MessageBox(NULL, "hoge", "foo", MB_OK); - if (func == NULL) { if ( ((h = GetModuleHandle("ttxssh.dll")) == NULL) ) { _snprintf_s(msg, sizeof(msg), _TRUNCATE, "GetModuleHandle(\"ttxssh.dll\")) %d", GetLastError()); @@ -877,11 +875,8 @@ } if (func != NULL) { - //MessageBox(NULL, ParamFileName, "foo2", MB_OK); - //MessageBox(NULL, ParamSecondFileName, "foo3", MB_OK); - DdeCmnd = TRUE; + // DdeCmnd = TRUE; func(ParamFileName, ParamSecondFileName); - EndDdeCmnd(1); // \x83}\x83N\x83\x8D\x8E\xC0\x8Ds\x82\xF0\x8FI\x97\xB9\x82\xB3\x82\xB9\x82\xE9\x81B\x96{\x97\x88\x82Ȃ\xE7\x81ASCP\x93]\x91\x97\x82\xAA\x8A\xAE\x97\xB9\x82\xB5\x82Ă\xA9\x82\xE7\x8CĂяo\x82\xB5\x82\xBD\x82ق\xA4\x82\xAA\x96]\x82܂\xB5\x82\xA2\x81B break; } @@ -898,8 +893,6 @@ static HMODULE h = NULL; char msg[128]; - //MessageBox(NULL, "hoge", "foo", MB_OK); - if (func == NULL) { if ( ((h = GetModuleHandle("ttxssh.dll")) == NULL) ) { _snprintf_s(msg, sizeof(msg), _TRUNCATE, "GetModuleHandle(\"ttxssh.dll\")) %d", GetLastError()); @@ -913,11 +906,8 @@ } if (func != NULL) { - //MessageBox(NULL, ParamFileName, "foo2", MB_OK); - //MessageBox(NULL, ParamSecondFileName, "foo3", MB_OK); - DdeCmnd = TRUE; + // DdeCmnd = TRUE; func(ParamFileName, ParamSecondFileName); - EndDdeCmnd(1); // \x83}\x83N\x83\x8D\x8E\xC0\x8Ds\x82\xF0\x8FI\x97\xB9\x82\xB3\x82\xB9\x82\xE9\x81B\x96{\x97\x88\x82Ȃ\xE7\x81ASCP\x93]\x91\x97\x82\xAA\x8A\xAE\x97\xB9\x82\xB5\x82Ă\xA9\x82\xE7\x8CĂяo\x82\xB5\x82\xBD\x82ق\xA4\x82\xAA\x96]\x82܂\xB5\x82\xA2\x81B break; } @@ -1035,20 +1025,14 @@ case CmdSendBroadcast: // 'sendbroadcast' SendAllBroadcastMessage(HVTWin, HVTWin, 0, ParamFileName, strlen(ParamFileName)); - DdeCmnd = TRUE; - EndDdeCmnd(0); // \x83}\x83N\x83\x8D\x8E\xC0\x8Ds\x82\xF0\x8FI\x97\xB9\x82\xB3\x82\xB9\x82\xE9\x81B break; case CmdSendMulticast: // 'sendmulticast' SendMulticastMessage(HVTWin, HVTWin, ParamFileName, ParamSecondFileName, strlen(ParamSecondFileName)); - DdeCmnd = TRUE; - EndDdeCmnd(0); // \x83}\x83N\x83\x8D\x8E\xC0\x8Ds\x82\xF0\x8FI\x97\xB9\x82\xB3\x82\xB9\x82\xE9\x81B break; case CmdSetMulticastName: // 'setmulticastname' SetMulticastName(ParamFileName); - DdeCmnd = TRUE; - EndDdeCmnd(0); // \x83}\x83N\x83\x8D\x8E\xC0\x8Ds\x82\xF0\x8FI\x97\xB9\x82\xB3\x82\xB9\x82\xE9\x81B break; case CmdDispStr: Modified: trunk/teraterm/ttpmacro/ttl.c =================================================================== --- trunk/teraterm/ttpmacro/ttl.c 2017-07-24 14:13:42 UTC (rev 6876) +++ trunk/teraterm/ttpmacro/ttl.c 2017-07-24 14:13:46 UTC (rev 6877) @@ -4061,7 +4061,7 @@ return Err; SetFile(buf); - return SendCmnd(CmdSendBroadcast,IdTTLWaitCmndEnd); + return SendCmnd(CmdSendBroadcast, 0); } // "setmulticastname"\x83R\x83}\x83\x93\x83h (2009.3.5 yutaka) @@ -4075,7 +4075,7 @@ if (Err!=0) return Err; SetFile(Str); - return SendCmnd(CmdSetMulticastName,IdTTLWaitCmndEnd); + return SendCmnd(CmdSetMulticastName, 0); } // "sendmulticast"\x83R\x83}\x83\x93\x83h (2009.3.5 yutaka) @@ -4097,7 +4097,7 @@ return Err; SetSecondFile(buf); - return SendCmnd(CmdSendMulticast,IdTTLWaitCmndEnd); + return SendCmnd(CmdSendMulticast, 0); } WORD TTLSendFile() @@ -5782,7 +5782,7 @@ SetFile(Str); SetSecondFile(Str2); - return SendCmnd(CmdScpSend,IdTTLWaitCmndEnd); + return SendCmnd(CmdScpSend, 0); } // SYNOPSIS: @@ -5814,7 +5814,7 @@ SetFile(Str); SetSecondFile(Str2); - return SendCmnd(CmdScpRcv,IdTTLWaitCmndEnd); + return SendCmnd(CmdScpRcv, 0); } int ExecCmnd()