svnno****@sourc*****
svnno****@sourc*****
2016年 11月 1日 (火) 15:01:27 JST
Revision: 6524 http://sourceforge.jp/projects/ttssh2/scm/svn/commits/6524 Author: doda Date: 2016-11-01 15:01:27 +0900 (Tue, 01 Nov 2016) Log Message: ----------- 送信するコマンドの末尾に改行を付加する設定を追加 Modified Paths: -------------- trunk/TTXSamples/TTXRecurringCommand/TTXRecurringCommand.c trunk/TTXSamples/TTXRecurringCommand/TTXRecurringCommand.rc trunk/TTXSamples/TTXRecurringCommand/resource.h trunk/doc/en/html/about/history.html trunk/doc/en/html/usage/recurringcommand.html trunk/doc/ja/html/about/history.html trunk/doc/ja/html/usage/recurringcommand.html trunk/installer/release/TERATERM.INI trunk/installer/release/lang/English.lng trunk/installer/release/lang/French.lng trunk/installer/release/lang/German.lng trunk/installer/release/lang/Japanese.lng trunk/installer/release/lang/Korean.lng trunk/installer/release/lang/Russian.lng trunk/installer/release/lang/Simplified Chinese.lng trunk/installer/release/lang/Traditional Chinese.lng -------------- next part -------------- Modified: trunk/TTXSamples/TTXRecurringCommand/TTXRecurringCommand.c =================================================================== --- trunk/TTXSamples/TTXRecurringCommand/TTXRecurringCommand.c 2016-11-01 06:01:23 UTC (rev 6523) +++ trunk/TTXSamples/TTXRecurringCommand/TTXRecurringCommand.c 2016-11-01 06:01:27 UTC (rev 6524) @@ -40,6 +40,7 @@ int interval; BOOL enable; int cmdLen; + BOOL add_nl; unsigned char command[OutBuffSize]; unsigned char orgCommand[OutBuffSize]; } TInstVar; @@ -350,6 +351,12 @@ UnEscapeStr(pvar->command); pvar->cmdLen = (int)strlen(pvar->command); + pvar->add_nl = GetOnOff(SECTION, "AddNewLine", sect, FALSE); + if (pvar->add_nl && pvar->cmdLen < sizeof(pvar->command) - 1) { + pvar->command[pvar->cmdLen++] = '\n'; + pvar->command[pvar->cmdLen] = '\0'; + } + pvar->interval = GetPrivateProfileInt(SECTION, "Interval", DEFAULT_INTERVAL, sect); if (pvar->interval < MINIMUM_INTERVAL) { pvar->interval = MINIMUM_INTERVAL; @@ -377,6 +384,8 @@ _snprintf_s(buff, sizeof(buff), _TRUNCATE, "%d", pvar->interval); WritePrivateProfileString(SECTION, "Interval", buff, fn); + WritePrivateProfileString(SECTION, "AddNewLine", pvar->add_nl?"on":"off", fn); + return; } @@ -473,6 +482,7 @@ SendDlgItemMessage(dlg, IDC_INTERVAL_LABEL, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); SendDlgItemMessage(dlg, IDC_COMMAND, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); SendDlgItemMessage(dlg, IDC_COMMAND_LABEL, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); + SendDlgItemMessage(dlg, IDC_ADD_NL, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); } else { DlgFont = NULL; @@ -494,10 +504,16 @@ GetI18nStr(SECTION, "DLG_COMMAND", pvar->ts->UIMsg, sizeof(pvar->ts->UIMsg), uimsg, pvar->ts->UILanguageFile); SetDlgItemText(dlg, IDC_COMMAND_LABEL, pvar->ts->UIMsg); + GetDlgItemText(dlg, IDC_ADD_NL, uimsg, sizeof(uimsg)); + GetI18nStr(SECTION, "DLG_ADD_NEWLINE", pvar->ts->UIMsg, sizeof(pvar->ts->UIMsg), uimsg, pvar->ts->UILanguageFile); + SetDlgItemText(dlg, IDC_ADD_NL, pvar->ts->UIMsg); + SendMessage(GetDlgItem(dlg, IDC_ENABLE), BM_SETCHECK, pvar->enable?BST_CHECKED:BST_UNCHECKED, 0); SetDlgItemInt(dlg, IDC_INTERVAL, pvar->interval, FALSE); SetDlgItemText(dlg, IDC_COMMAND, pvar->orgCommand); + SendMessage(GetDlgItem(dlg, IDC_ADD_NL), BM_SETCHECK, + pvar->add_nl?BST_CHECKED:BST_UNCHECKED, 0); return TRUE; case WM_COMMAND: @@ -515,6 +531,12 @@ UnEscapeStr(pvar->command); pvar->cmdLen = (int)strlen(pvar->command); + pvar->add_nl = IsDlgButtonChecked(dlg, IDC_ADD_NL) == BST_CHECKED; + if (pvar->add_nl && pvar->cmdLen < sizeof(pvar->command) - 1) { + pvar->command[pvar->cmdLen++] = '\n'; + pvar->command[pvar->cmdLen] = '\0'; + } + if (pvar->cv->Ready) { if (pvar->enable) { SetTimer(pvar->cv->HWin, IdRecurringTimer, Modified: trunk/TTXSamples/TTXRecurringCommand/TTXRecurringCommand.rc =================================================================== --- trunk/TTXSamples/TTXRecurringCommand/TTXRecurringCommand.rc 2016-11-01 06:01:23 UTC (rev 6523) +++ trunk/TTXSamples/TTXRecurringCommand/TTXRecurringCommand.rc 2016-11-01 06:01:27 UTC (rev 6524) @@ -18,8 +18,9 @@ CONTROL "&Enable", IDC_ENABLE, "Button", BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP, 5, 6, 32, 9 LTEXT "&Interval(sec)", IDC_INTERVAL_LABEL, 50, 7, 40, 8, WS_GROUP EDITTEXT IDC_INTERVAL, 100, 6, 36, 11, WS_GROUP | ES_AUTOHSCROLL | ES_NUMBER | WS_TABSTOP - LTEXT "&Command", IDC_COMMAND_LABEL, 5, 28, 60, 10, WS_GROUP - EDITTEXT IDC_COMMAND, 42, 25, 94, 12, ES_AUTOHSCROLL | WS_TABSTOP - DEFPUSHBUTTON "OK", IDOK, 15, 50, 50, 14 - PUSHBUTTON "Cancel", IDCANCEL, 81, 50, 50, 14 + LTEXT "&Command", IDC_COMMAND_LABEL, 5, 24, 60, 10, WS_GROUP + EDITTEXT IDC_COMMAND, 42, 21, 94, 12, ES_AUTOHSCROLL | WS_TABSTOP + CONTROL "&Add new line", IDC_ADD_NL, "Button", BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP, 42, 38, 60, 9 + DEFPUSHBUTTON "OK", IDOK, 15, 52, 50, 14 + PUSHBUTTON "Cancel", IDCANCEL, 81, 52, 50, 14 END Modified: trunk/TTXSamples/TTXRecurringCommand/resource.h =================================================================== --- trunk/TTXSamples/TTXRecurringCommand/resource.h 2016-11-01 06:01:23 UTC (rev 6523) +++ trunk/TTXSamples/TTXRecurringCommand/resource.h 2016-11-01 06:01:27 UTC (rev 6524) @@ -8,3 +8,4 @@ #define IDC_INTERVAL_LABEL 2003 #define IDC_COMMAND 2004 #define IDC_COMMAND_LABEL 2005 +#define IDC_ADD_NL 2006 Modified: trunk/doc/en/html/about/history.html =================================================================== --- trunk/doc/en/html/about/history.html 2016-11-01 06:01:23 UTC (rev 6523) +++ trunk/doc/en/html/about/history.html 2016-11-01 06:01:27 UTC (rev 6524) @@ -55,6 +55,7 @@ <ul> <li>upgraded TTSSH to <a href="#ttssh_2.79">2.79</a></li> <li>upgraded TTX KanjiMenu Plug-in to <a href="#kanjimenu_0.1.7">0.1.7</a></li> + <li>upgraded TTXRecurringCommand Plug-in to <a href="#recurringcommand_1.05">1.05</a></li> </ul> </li> </ul> @@ -4496,6 +4497,12 @@ </ul> <h2><a name="recurringcommand">TTXRecurringCommand</a></h2> +<h3><a name="recurringcommand_1.05">2016.xx.xx (Ver 1.05)</a></h3> +<ul class="history"> + <!-- li>\x91\x97\x90M\x82\xB7\x82\xE9\x83R\x83}\x83\x93\x83h\x82̖\x96\x94\xF6\x82ɉ\xFC\x8Ds\x82\xF0\x95t\x89\xC1\x82\xB7\x82\xE9\x90ݒ\xE8\x82\xF0\x92lj\xC1\x82\xB5\x82\xBD\x81B</li --> +</ul> + + <h3><a name="recurringcommand_1.04">2015.12.01 (Ver 1.04)</a></h3> <h3><a name="recurringcommand_1.04">2015.12.01 (Ver 1.04)</a></h3> <ul class="history"> <li>The command line option can be quoted from an offset when the '"' is used.</li> Modified: trunk/doc/en/html/usage/recurringcommand.html =================================================================== --- trunk/doc/en/html/usage/recurringcommand.html 2016-11-01 06:01:23 UTC (rev 6523) +++ trunk/doc/en/html/usage/recurringcommand.html 2016-11-01 06:01:27 UTC (rev 6524) @@ -64,6 +64,9 @@ </tbody> </table> </dd> + + <dt>\x89\xFC\x8Ds\x82\xF0\x92lj\xC1 (Add new line)</dt> + <dd>on \x82ɂ\xB7\x82\xE9\x82Ƒ\x97\x90M\x82\xB7\x82\xE9\x83R\x83}\x83\x93\x83h\x82̖\x96\x94\xF6\x82ɉ\xFC\x8Ds\x82\xF0\x92lj\xC1\x82\xB5\x82܂\xB7\x81B</dd> </dl> --> Modified: trunk/doc/ja/html/about/history.html =================================================================== --- trunk/doc/ja/html/about/history.html 2016-11-01 06:01:23 UTC (rev 6523) +++ trunk/doc/ja/html/about/history.html 2016-11-01 06:01:27 UTC (rev 6524) @@ -55,6 +55,7 @@ <ul> <li><a href="#ttssh_2.79">TTSSH(2.79)</a>\x82֍\xB7\x82\xB5\x91ւ\xA6\x82\xBD\x81B</li> <li><a href="#kanjimenu_0.1.7">TTX KanjiMenu Plugin(0.1.7)</a>\x82֍\xB7\x82\xB5\x91ւ\xA6\x82\xBD\x81B</li> + <li><a href="#recurringcommand_1.05">TTXRecurringCommand Plugin(1.05)</a>\x82֍\xB7\x82\xB5\x91ւ\xA6\x82\xBD\x81B</li> </ul> </li> </ul> @@ -4501,6 +4502,11 @@ </ul> <h2><a name="recurringcommand">TTXRecurringCommand</a></h2> +<h3><a name="recurringcommand_1.05">2016.xx.xx (Ver 1.05)</a></h3> +<ul class="history"> + <li>\x91\x97\x90M\x82\xB7\x82\xE9\x83R\x83}\x83\x93\x83h\x82̖\x96\x94\xF6\x82ɉ\xFC\x8Ds\x82\xF0\x95t\x89\xC1\x82\xB7\x82\xE9\x90ݒ\xE8\x82\xF0\x92lj\xC1\x82\xB5\x82\xBD\x81B</li> +</ul> + <h3><a name="recurringcommand_1.04">2015.12.01 (Ver 1.04)</a></h3> <ul class="history"> <li>\x83R\x83}\x83\x93\x83h\x83\x89\x83C\x83\x93\x83I\x83v\x83V\x83\x87\x83\x93\x82̃p\x81[\x83X\x8F\x88\x97\x9D\x82\xF0\x95ύX\x82\xB5\x81A\x83p\x83\x89\x83\x81\x81[\x83^\x82̓r\x92\x86\x82\xA9\x82\xE7\x82ł\xE0 '"' \x82ɂ\xE6\x82\xE9\x83N\x83I\x81[\x83g\x82\xF0\x89\\x82ɂ\xB5\x82\xBD\x81B</li> Modified: trunk/doc/ja/html/usage/recurringcommand.html =================================================================== --- trunk/doc/ja/html/usage/recurringcommand.html 2016-11-01 06:01:23 UTC (rev 6523) +++ trunk/doc/ja/html/usage/recurringcommand.html 2016-11-01 06:01:27 UTC (rev 6524) @@ -63,6 +63,9 @@ </tbody> </table> </dd> + + <dt>\x89\xFC\x8Ds\x82\xF0\x92lj\xC1 (Add new line)</dt> + <dd>on \x82ɂ\xB7\x82\xE9\x82Ƒ\x97\x90M\x82\xB7\x82\xE9\x83R\x83}\x83\x93\x83h\x82̖\x96\x94\xF6\x82ɉ\xFC\x8Ds\x82\xF0\x92lj\xC1\x82\xB5\x82܂\xB7\x81B</dd> </dl> </body> Modified: trunk/installer/release/TERATERM.INI =================================================================== --- trunk/installer/release/TERATERM.INI 2016-11-01 06:01:23 UTC (rev 6523) +++ trunk/installer/release/TERATERM.INI 2016-11-01 06:01:27 UTC (rev 6524) @@ -903,6 +903,7 @@ Enable=off Command= Interval=300 +AddNewLine=off [Resize Menu] ; 80x62 Modified: trunk/installer/release/lang/English.lng =================================================================== --- trunk/installer/release/lang/English.lng 2016-11-01 06:01:23 UTC (rev 6523) +++ trunk/installer/release/lang/English.lng 2016-11-01 06:01:27 UTC (rev 6524) @@ -1063,3 +1063,4 @@ DLG_ENABLE=&Enable DLG_INTERVAL=&Interval(sec) DLG_COMMAND=&Command +DLG_ADD_NEWLINE=&Add new line Modified: trunk/installer/release/lang/French.lng =================================================================== --- trunk/installer/release/lang/French.lng 2016-11-01 06:01:23 UTC (rev 6523) +++ trunk/installer/release/lang/French.lng 2016-11-01 06:01:27 UTC (rev 6524) @@ -1063,3 +1063,4 @@ DLG_ENABLE=&Valider DLG_INTERVAL=&Intervalle(sec) DLG_COMMAND=&Commande +DLG_ADD_NEWLINE=&Add new line Modified: trunk/installer/release/lang/German.lng =================================================================== --- trunk/installer/release/lang/German.lng 2016-11-01 06:01:23 UTC (rev 6523) +++ trunk/installer/release/lang/German.lng 2016-11-01 06:01:27 UTC (rev 6524) @@ -1062,3 +1062,4 @@ DLG_ENABLE=&Aktivieren DLG_INTERVAL=&Intervall (sek) DLG_COMMAND=&Befehl +DLG_ADD_NEWLINE=&Add new line Modified: trunk/installer/release/lang/Japanese.lng =================================================================== --- trunk/installer/release/lang/Japanese.lng 2016-11-01 06:01:23 UTC (rev 6523) +++ trunk/installer/release/lang/Japanese.lng 2016-11-01 06:01:27 UTC (rev 6524) @@ -1063,3 +1063,4 @@ DLG_ENABLE=\x97L\x8C\xF8(&E) DLG_INTERVAL=\x8AԊu(\x95b)(&I) DLG_COMMAND=\x83R\x83}\x83\x93\x83h(&C) +DLG_ADD_NEWLINE=\x89\xFC\x8Ds\x82\xF0\x92lj\xC1(&A) Modified: trunk/installer/release/lang/Korean.lng =================================================================== --- trunk/installer/release/lang/Korean.lng 2016-11-01 06:01:23 UTC (rev 6523) +++ trunk/installer/release/lang/Korean.lng 2016-11-01 06:01:27 UTC (rev 6524) @@ -1063,3 +1063,4 @@ DLG_ENABLE=Ȱ\xBC\xBAȭ(&E) DLG_INTERVAL=\xB0\xA3\xB0\xDD(sec)(&I) DLG_COMMAND=\xB8\xED\xB7\xC9(&C) +DLG_ADD_NEWLINE=&Add new line Modified: trunk/installer/release/lang/Russian.lng =================================================================== --- trunk/installer/release/lang/Russian.lng 2016-11-01 06:01:23 UTC (rev 6523) +++ trunk/installer/release/lang/Russian.lng 2016-11-01 06:01:27 UTC (rev 6524) @@ -1064,3 +1064,4 @@ DLG_ENABLE=&\xD0\xE0\xE7\xF0\xE5\xF8\xE5\xED\xEE DLG_INTERVAL=&\xC8\xED\xF2\xE5\xF0\xE2\xE0\xEB(\xF1\xE5\xEA) DLG_COMMAND=&\xCA\xEE\xEC\xE0\xED\xE4\xE0 +DLG_ADD_NEWLINE=&Add new line Modified: trunk/installer/release/lang/Simplified Chinese.lng =================================================================== --- trunk/installer/release/lang/Simplified Chinese.lng 2016-11-01 06:01:23 UTC (rev 6523) +++ trunk/installer/release/lang/Simplified Chinese.lng 2016-11-01 06:01:27 UTC (rev 6524) @@ -1064,3 +1064,4 @@ DLG_ENABLE=\xC6\xF4\xD3\xC3(&E) DLG_INTERVAL=\xBC\xE4\xB8\xF4(\xC3\xEB)(&I) DLG_COMMAND=\xC3\xFC\xC1\xEE(&C) +DLG_ADD_NEWLINE=&Add new line Modified: trunk/installer/release/lang/Traditional Chinese.lng =================================================================== --- trunk/installer/release/lang/Traditional Chinese.lng 2016-11-01 06:01:23 UTC (rev 6523) +++ trunk/installer/release/lang/Traditional Chinese.lng 2016-11-01 06:01:27 UTC (rev 6524) @@ -1064,3 +1064,4 @@ DLG_ENABLE=\xB1ҥ\xCE(&E) DLG_INTERVAL=\xB6\xA1\xB9j(\xAC\xED)(&I) DLG_COMMAND=\xA9R\xA5O(&C) +DLG_ADD_NEWLINE=&Add new line