svnno****@sourc*****
svnno****@sourc*****
2013年 4月 21日 (日) 19:32:32 JST
Revision: 5212 http://sourceforge.jp/projects/ttssh2/scm/svn/commits/5212 Author: maya Date: 2013-04-21 19:32:32 +0900 (Sun, 21 Apr 2013) Log Message: ----------- bringupbox マクロコマンドを追加 Modified Paths: -------------- trunk/doc/en/html/about/history.html trunk/doc/en/html/macro/command/index.html trunk/doc/en/html/macro/command/statusbox.html trunk/doc/en/teraterm.hhc trunk/doc/en/teraterm.hhp trunk/doc/ja/html/about/history.html trunk/doc/ja/html/macro/command/index.html trunk/doc/ja/html/macro/command/statusbox.html trunk/doc/ja/teraterm.hhc trunk/doc/ja/teraterm.hhp trunk/teraterm/common/helpid.h trunk/teraterm/ttpmacro/statdlg.cpp trunk/teraterm/ttpmacro/statdlg.h trunk/teraterm/ttpmacro/ttl.c trunk/teraterm/ttpmacro/ttmdlg.cpp trunk/teraterm/ttpmacro/ttmdlg.h trunk/teraterm/ttpmacro/ttmparse.c trunk/teraterm/ttpmacro/ttmparse.h Added Paths: ----------- trunk/doc/en/html/macro/command/bringupbox.html trunk/doc/ja/html/macro/command/bringupbox.html Removed Paths: ------------- trunk/doc/en/html/macro/command/bringupmacro.html trunk/doc/ja/html/macro/command/bringupmacro.html -------------- next part -------------- Modified: trunk/doc/en/html/about/history.html =================================================================== --- trunk/doc/en/html/about/history.html 2013-04-21 10:26:56 UTC (rev 5211) +++ trunk/doc/en/html/about/history.html 2013-04-21 10:32:32 UTC (rev 5212) @@ -55,7 +55,7 @@ <li>added the <a href="../macro/command/checksum16.html">checksum16file</a> command.</li> <li>added the <a href="../macro/command/checksum32.html">checksum32</a> command.</li> <li>added the <a href="../macro/command/checksum32.html">checksum32file</a> command.</li> - <li>added the <a href="../macro/command/bringupmacro.html">bringupmacro</a> command.</li> + <li>added the <a href="../macro/command/bringupbox.html">bringupbox</a> command.</li> <li>added the <a href="../macro/command/regexoption.html">regexoption</a> command.</li> </ul></li> <li>Select "Selection" by default in the printer dialog when there is a selection. Special thanks to tentner.</li> Copied: trunk/doc/en/html/macro/command/bringupbox.html (from rev 5210, trunk/doc/en/html/macro/command/bringupmacro.html) =================================================================== --- trunk/doc/en/html/macro/command/bringupbox.html (rev 0) +++ trunk/doc/en/html/macro/command/bringupbox.html 2013-04-21 10:32:32 UTC (rev 5212) @@ -0,0 +1,62 @@ +<!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=iso-8859-1"> + <title>bringupbox</title> + <meta http-equiv="Content-Style-Type" content="text/css"> + <link rel="stylesheet" href="../../style.css" type="text/css"> +</head> + +<body> + + +<h1>bringupbox</h1> + +<p> +<!-- +statusbox \x83R\x83}\x83\x93\x83h\x82ɂ\xE6\x82\xC1\x82ĊJ\x82\xA9\x82ꂽ\x83X\x83e\x81[\x83^\x83X\x83_\x83C\x83A\x83\x8D\x83O\x83{\x83b\x83N\x83X\x82\xF0\x8DőO\x96ʂɕ\\x8E\xA6\x82\xB7\x82\xE9\x81B +--> +</p> + +<pre class="macro-syntax"> +bringupbox +</pre> + +<h2>Parameters</h2> +None. + +<h2>Return Value</h2> +None. + +<h2>Example</h2> + +<pre class="macro-example"> +step = 0 +while 1 + call show_step + sendln 'echo do something' + wait '$' + pause 2 + + bringupbox + +endwhile +end + +:show_step +step = step + 1 +gettime timestr "%Y/%m/%d-%H:%M:%S" +sprintf2 s "counter %d" step +statusbox timestr s +return +</pre> + +<h2>See also</h2> + +<ul> + <li><a href="statusbox.html">statusbox</a></li> +</ul> + +</body> +</html> Deleted: trunk/doc/en/html/macro/command/bringupmacro.html =================================================================== --- trunk/doc/en/html/macro/command/bringupmacro.html 2013-04-21 10:26:56 UTC (rev 5211) +++ trunk/doc/en/html/macro/command/bringupmacro.html 2013-04-21 10:32:32 UTC (rev 5212) @@ -1,56 +0,0 @@ -<!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=iso-8859-1"> - <title>bringupmacro</title> - <meta http-equiv="Content-Style-Type" content="text/css"> - <link rel="stylesheet" href="../../style.css" type="text/css"> -</head> - -<body> - - -<h1>bringupmacro</h1> - -<p> -Brings the MACRO window to the top of the Z order. -</p> - -<pre class="macro-syntax"> -bringupmacro -</pre> - -<h2>Parameters</h2> -None. - -<h2>Return Value</h2> -None. - -<h2>Example</h2> - -<pre class="macro-example"> -step = 0 -while 1 - call show_step - sendln 'echo do something' - wait '$' - pause 2 - - bringupmacro - -endwhile -end - -:show_step -step = step + 1 -gettime timestr "%Y/%m/%d-%H:%M:%S" -sprintf2 s "counter %d" step -statusbox timestr s -return -</pre> - -<h2>See also</h2> - -</body> -</html> Modified: trunk/doc/en/html/macro/command/index.html =================================================================== --- trunk/doc/en/html/macro/command/index.html 2013-04-21 10:26:56 UTC (rev 5211) +++ trunk/doc/en/html/macro/command/index.html 2013-04-21 10:32:32 UTC (rev 5212) @@ -185,7 +185,7 @@ <h2>Miscellaneous commands</h2> <ul> <li><a href="beep.html">beep</a> - <li><a href="bringupmacro.html">bringupmacro</a> (version 4.78 or later) + <li><a href="bringupbox.html">bringupbox</a> (version 4.78 or later) <li><a href="checksum8.html">checksum8</a> (version 4.78 or later) <li><a href="checksum8.html">checksum8file</a> (version 4.78 or later) <li><a href="checksum16.html">checksum16</a> (version 4.78 or later) Modified: trunk/doc/en/html/macro/command/statusbox.html =================================================================== --- trunk/doc/en/html/macro/command/statusbox.html 2013-04-21 10:26:56 UTC (rev 5211) +++ trunk/doc/en/html/macro/command/statusbox.html 2013-04-21 10:32:32 UTC (rev 5212) @@ -107,6 +107,8 @@ <h2>See also</h2> <ul> <li><a href="strspecial.html">strspecial</a></li> + <li><a href="closesbox.html">closesbox</a></li> + <li><a href="bringupbox.html">bringupbox</a></li> </ul> </body> Modified: trunk/doc/en/teraterm.hhc =================================================================== --- trunk/doc/en/teraterm.hhc 2013-04-21 10:26:56 UTC (rev 5211) +++ trunk/doc/en/teraterm.hhc 2013-04-21 10:32:32 UTC (rev 5212) @@ -1357,8 +1357,8 @@ <param name="ImageNumber" value="11"> </OBJECT> <LI> <OBJECT type="text/sitemap"> - <param name="Name" value="bringupmacro"> - <param name="Local" value="html\macro\command\bringupmacro.html"> + <param name="Name" value="bringupbox"> + <param name="Local" value="html\macro\command\bringupbox.html"> <param name="ImageNumber" value="11"> </OBJECT> <LI> <OBJECT type="text/sitemap"> Modified: trunk/doc/en/teraterm.hhp =================================================================== --- trunk/doc/en/teraterm.hhp 2013-04-21 10:26:56 UTC (rev 5211) +++ trunk/doc/en/teraterm.hhp 2013-04-21 10:32:32 UTC (rev 5212) @@ -156,7 +156,7 @@ HlpMacroCommandBplusrecv=html\macro\command\bplusrecv.html HlpMacroCommandBplussend=html\macro\command\bplussend.html HlpMacroCommandBreak=html\macro\command\break.html -HlpMacroCommandBringupmacro=html\macro\command\bringupmacro.html +HlpMacroCommandBringupbox=html\macro\command\bringupbox.html HlpMacroCommandCall=html\macro\command\call.html HlpMacroCommandCallmenu=html\macro\command\callmenu.html HlpMacroCommandChangedir=html\macro\command\changedir.html Modified: trunk/doc/ja/html/about/history.html =================================================================== --- trunk/doc/ja/html/about/history.html 2013-04-21 10:26:56 UTC (rev 5211) +++ trunk/doc/ja/html/about/history.html 2013-04-21 10:32:32 UTC (rev 5212) @@ -54,7 +54,7 @@ <li><a href="../macro/command/checksum16.html">checksum16file</a>\x83R\x83}\x83\x93\x83h\x82\xF0\x92lj\xC1\x82\xB5\x82\xBD\x81B</li> <li><a href="../macro/command/checksum32.html">checksum32</a>\x83R\x83}\x83\x93\x83h\x82\xF0\x92lj\xC1\x82\xB5\x82\xBD\x81B</li> <li><a href="../macro/command/checksum32.html">checksum32file</a>\x83R\x83}\x83\x93\x83h\x82\xF0\x92lj\xC1\x82\xB5\x82\xBD\x81B</li> - <li><a href="../macro/command/bringupmacro.html">bringupmacro</a>\x83R\x83}\x83\x93\x83h\x82\xF0\x92lj\xC1\x82\xB5\x82\xBD\x81B</li> + <li><a href="../macro/command/bringupbox.html">bringupbox</a>\x83R\x83}\x83\x93\x83h\x82\xF0\x92lj\xC1\x82\xB5\x82\xBD\x81B</li> <li><a href="../macro/command/regexoption.html">regexoption</a>\x83R\x83}\x83\x93\x83h\x82\xF0\x92lj\xC1\x82\xB5\x82\xBD\x81B</li> </ul></li> <li>\x82\xB7\x82łɑI\x91\xF0\x82\xB3\x82\xEA\x82Ă\xA2\x82\xE9\x83e\x83L\x83X\x83g\x82\xAA\x91\xB6\x8D݂\xB7\x82\xE9\x8Fꍇ\x81A\x83v\x83\x8A\x83\x93\x83^\x83_\x83C\x83A\x83\x8D\x83O\x82̃f\x83t\x83H\x83\x8B\x83g\x91I\x91\xF0\x8E\x88\x82\xF0\x81u\x91I\x91\xF0\x82\xB5\x82\xBD\x95\x94\x95\xAA\x81v\x82ɂ\xB7\x82\xE9\x82悤\x82ɂ\xB5\x82\xBD\x81Btentner\x8E\x81\x82Ɋ\xB4\x8EӁB</li> Copied: trunk/doc/ja/html/macro/command/bringupbox.html (from rev 5210, trunk/doc/ja/html/macro/command/bringupmacro.html) =================================================================== --- trunk/doc/ja/html/macro/command/bringupbox.html (rev 0) +++ trunk/doc/ja/html/macro/command/bringupbox.html 2013-04-21 10:32:32 UTC (rev 5212) @@ -0,0 +1,60 @@ +<!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=Shift_JIS"> + <title>bringupbox</title> + <meta http-equiv="Content-Style-Type" content="text/css"> + <link rel="stylesheet" href="../../style.css" type="text/css"> +</head> + +<body> + + +<h1>bringupbox</h1> + +<p> +statusbox \x83R\x83}\x83\x93\x83h\x82ɂ\xE6\x82\xC1\x82ĊJ\x82\xA9\x82ꂽ\x83X\x83e\x81[\x83^\x83X\x83_\x83C\x83A\x83\x8D\x83O\x83{\x83b\x83N\x83X\x82\xF0\x8DőO\x96ʂɕ\\x8E\xA6\x82\xB7\x82\xE9\x81B +</p> + +<pre class="macro-syntax"> +bringupbox +</pre> + +<h2>\x83p\x83\x89\x83\x81\x81[\x83^</h2> +\x82Ȃ\xB5\x81B + +<h2>\x95Ԃ\xE8\x92l</h2> +\x82Ȃ\xB5\x81B + +<h2>\x97\xE1</h2> + +<pre class="macro-example"> +step = 0 +while 1 + call show_step + sendln 'echo do something' + wait '$' + pause 2 + + bringupbox + +endwhile +end + +:show_step +step = step + 1 +gettime timestr "%Y/%m/%d-%H:%M:%S" +sprintf2 s "counter %d" step +statusbox timestr s +return +</pre> + +<h2>\x8EQ\x8F\xC6</h2> + +<ul> + <li><a href="statusbox.html">statusbox</a></li> +</ul> + +</body> +</html> Deleted: trunk/doc/ja/html/macro/command/bringupmacro.html =================================================================== --- trunk/doc/ja/html/macro/command/bringupmacro.html 2013-04-21 10:26:56 UTC (rev 5211) +++ trunk/doc/ja/html/macro/command/bringupmacro.html 2013-04-21 10:32:32 UTC (rev 5212) @@ -1,56 +0,0 @@ -<!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=Shift_JIS"> - <title>bringupmacro</title> - <meta http-equiv="Content-Style-Type" content="text/css"> - <link rel="stylesheet" href="../../style.css" type="text/css"> -</head> - -<body> - - -<h1>bringupmacro</h1> - -<p> -MACRO \x83E\x83B\x83\x93\x83h\x83E\x82\xF0\x8DőO\x96ʂɕ\\x8E\xA6\x82\xB7\x82\xE9\x81B -</p> - -<pre class="macro-syntax"> -bringupmacro -</pre> - -<h2>\x83p\x83\x89\x83\x81\x81[\x83^</h2> -\x82Ȃ\xB5\x81B - -<h2>\x95Ԃ\xE8\x92l</h2> -\x82Ȃ\xB5\x81B - -<h2>\x97\xE1</h2> - -<pre class="macro-example"> -step = 0 -while 1 - call show_step - sendln 'echo do something' - wait '$' - pause 2 - - bringupmacro - -endwhile -end - -:show_step -step = step + 1 -gettime timestr "%Y/%m/%d-%H:%M:%S" -sprintf2 s "counter %d" step -statusbox timestr s -return -</pre> - -<h2>\x8EQ\x8F\xC6</h2> - -</body> -</html> Modified: trunk/doc/ja/html/macro/command/index.html =================================================================== --- trunk/doc/ja/html/macro/command/index.html 2013-04-21 10:26:56 UTC (rev 5211) +++ trunk/doc/ja/html/macro/command/index.html 2013-04-21 10:32:32 UTC (rev 5212) @@ -185,7 +185,7 @@ <h2>\x82\xBB\x82̑\xBC\x82̃R\x83}\x83\x93\x83h</h2> <ul> <li><a href="beep.html">beep</a> - <li><a href="bringupmacro.html">bringupmacro</a> (\x83o\x81[\x83W\x83\x87\x83\x934.78\x88ȍ~) + <li><a href="bringupbox.html">bringupbox</a> (\x83o\x81[\x83W\x83\x87\x83\x934.78\x88ȍ~) <li><a href="checksum8.html">checksum8</a> (\x83o\x81[\x83W\x83\x87\x83\x934.78\x88ȍ~) <li><a href="checksum8.html">checksum8file</a> (\x83o\x81[\x83W\x83\x87\x83\x934.78\x88ȍ~) <li><a href="checksum16.html">checksum16</a> (\x83o\x81[\x83W\x83\x87\x83\x934.78\x88ȍ~) Modified: trunk/doc/ja/html/macro/command/statusbox.html =================================================================== --- trunk/doc/ja/html/macro/command/statusbox.html 2013-04-21 10:26:56 UTC (rev 5211) +++ trunk/doc/ja/html/macro/command/statusbox.html 2013-04-21 10:32:32 UTC (rev 5212) @@ -107,6 +107,8 @@ <h2>\x8EQ\x8F\xC6</h2> <ul> <li><a href="strspecial.html">strspecial</a></li> + <li><a href="closesbox.html">closesbox</a></li> + <li><a href="bringupbox.html">bringupbox</a></li> </ul> </body> Modified: trunk/doc/ja/teraterm.hhc =================================================================== --- trunk/doc/ja/teraterm.hhc 2013-04-21 10:26:56 UTC (rev 5211) +++ trunk/doc/ja/teraterm.hhc 2013-04-21 10:32:32 UTC (rev 5212) @@ -1362,8 +1362,8 @@ <param name="ImageNumber" value="11"> </OBJECT> <LI> <OBJECT type="text/sitemap"> - <param name="Name" value="bringupmacro"> - <param name="Local" value="html\macro\command\bringupmacro.html"> + <param name="Name" value="bringupbox"> + <param name="Local" value="html\macro\command\bringupbox.html"> </OBJECT> <LI> <OBJECT type="text/sitemap"> <param name="Name" value="checksum8"> Modified: trunk/doc/ja/teraterm.hhp =================================================================== --- trunk/doc/ja/teraterm.hhp 2013-04-21 10:26:56 UTC (rev 5211) +++ trunk/doc/ja/teraterm.hhp 2013-04-21 10:32:32 UTC (rev 5212) @@ -166,7 +166,7 @@ HlpMacroCommandBplusrecv=html\macro\command\bplusrecv.html HlpMacroCommandBplussend=html\macro\command\bplussend.html HlpMacroCommandBreak=html\macro\command\break.html -HlpMacroCommandBringupmacro=html\macro\command\bringupmacro.html +HlpMacroCommandBringupbox=html\macro\command\bringupbox.html HlpMacroCommandCall=html\macro\command\call.html HlpMacroCommandCallmenu=html\macro\command\callmenu.html HlpMacroCommandChangedir=html\macro\command\changedir.html Modified: trunk/teraterm/common/helpid.h =================================================================== --- trunk/teraterm/common/helpid.h 2013-04-21 10:26:56 UTC (rev 5211) +++ trunk/teraterm/common/helpid.h 2013-04-21 10:32:32 UTC (rev 5212) @@ -174,7 +174,7 @@ #define HlpMacroCommandChecksum16file 92207 #define HlpMacroCommandChecksum32 92208 #define HlpMacroCommandChecksum32file 92209 -#define HlpMacroCommandBringupMacro 92210 +#define HlpMacroCommandBringupbox 92210 #define HlpMacroCommandClearscreen 92006 #define HlpMacroCommandClipb2var 92113 Modified: trunk/teraterm/ttpmacro/statdlg.cpp =================================================================== --- trunk/teraterm/ttpmacro/statdlg.cpp 2013-04-21 10:26:56 UTC (rev 5211) +++ trunk/teraterm/ttpmacro/statdlg.cpp 2013-04-21 10:32:32 UTC (rev 5212) @@ -210,3 +210,23 @@ InvalidateRect(NULL); } + +void CStatDlg::Bringup() +{ + DWORD pid; + DWORD thisThreadId; + DWORD fgThreadId; + + thisThreadId = GetWindowThreadProcessId(GetSafeHwnd(), &pid); + fgThreadId = GetWindowThreadProcessId(::GetForegroundWindow(), &pid); + + if (thisThreadId == fgThreadId) { + SetForegroundWindow(); + BringWindowToTop(); + } else { + AttachThreadInput(thisThreadId, fgThreadId, TRUE); + SetForegroundWindow(); + BringWindowToTop(); + AttachThreadInput(thisThreadId, fgThreadId, FALSE); + } +} Modified: trunk/teraterm/ttpmacro/statdlg.h =================================================================== --- trunk/teraterm/ttpmacro/statdlg.h 2013-04-21 10:26:56 UTC (rev 5211) +++ trunk/teraterm/ttpmacro/statdlg.h 2013-04-21 10:32:32 UTC (rev 5212) @@ -9,6 +9,7 @@ public: BOOL Create(PCHAR Text, PCHAR Title, int x, int y); void Update(PCHAR Text, PCHAR Title, int x, int y); + void Bringup(); //{{AFX_DATA(CStatDlg) enum { IDD = IDD_STATDLG }; Modified: trunk/teraterm/ttpmacro/ttl.c =================================================================== --- trunk/teraterm/ttpmacro/ttl.c 2013-04-21 10:26:56 UTC (rev 5211) +++ trunk/teraterm/ttpmacro/ttl.c 2013-04-21 10:32:32 UTC (rev 5212) @@ -319,6 +319,14 @@ return BreakLoop(WId); } +WORD TTLBringupBox() +{ + if (GetFirstChar()!=0) + return ErrSyntax; + BringupStatDlg(); + return 0; +} + WORD TTLCall() { TName LabName; @@ -5663,6 +5671,8 @@ case RsvBreak: case RsvContinue: Err = TTLBreak(WId); break; + case RsvBringupBox: + Err = TTLBringupBox(); break; case RsvCall: Err = TTLCall(); break; case RsvCallMenu: Modified: trunk/teraterm/ttpmacro/ttmdlg.cpp =================================================================== --- trunk/teraterm/ttpmacro/ttmdlg.cpp 2013-04-21 10:26:56 UTC (rev 5211) +++ trunk/teraterm/ttpmacro/ttmdlg.cpp 2013-04-21 10:32:32 UTC (rev 5212) @@ -302,6 +302,16 @@ } extern "C" { +void BringupStatDlg() +{ + if (StatDlg==NULL) { + return; + } + StatDlg->Bringup(); +} +} + +extern "C" { int OpenListDlg(PCHAR Text, PCHAR Caption, CHAR **Lists) { int ret = -1; Modified: trunk/teraterm/ttpmacro/ttmdlg.h =================================================================== --- trunk/teraterm/ttpmacro/ttmdlg.h 2013-04-21 10:26:56 UTC (rev 5211) +++ trunk/teraterm/ttpmacro/ttmdlg.h 2013-04-21 10:32:32 UTC (rev 5212) @@ -21,6 +21,7 @@ int OpenMsgDlg(PCHAR Text, PCHAR Caption, BOOL YesNo); void OpenStatDlg(PCHAR Text, PCHAR Caption); void CloseStatDlg(); +void BringupStatDlg(); int OpenListDlg(PCHAR Text, PCHAR Caption, CHAR **Lists); Modified: trunk/teraterm/ttpmacro/ttmparse.c =================================================================== --- trunk/teraterm/ttpmacro/ttmparse.c 2013-04-21 10:26:56 UTC (rev 5211) +++ trunk/teraterm/ttpmacro/ttmparse.c 2013-04-21 10:32:32 UTC (rev 5212) @@ -150,6 +150,7 @@ else if (_stricmp(Str,"bplusrecv")==0) *WordId = RsvBPlusRecv; else if (_stricmp(Str,"bplussend")==0) *WordId = RsvBPlusSend; else if (_stricmp(Str,"break")==0) *WordId = RsvBreak; + else if (_stricmp(Str,"bringupbox")==0) *WordId = RsvBringupBox; else if (_stricmp(Str,"basename")==0) *WordId = RsvBasename; break; case 'c': Modified: trunk/teraterm/ttpmacro/ttmparse.h =================================================================== --- trunk/teraterm/ttpmacro/ttmparse.h 2013-04-21 10:26:56 UTC (rev 5211) +++ trunk/teraterm/ttpmacro/ttmparse.h 2013-04-21 10:32:32 UTC (rev 5212) @@ -238,7 +238,7 @@ #define RsvChecksum16File 207 #define RsvChecksum32 208 #define RsvChecksum32File 209 -#define RsvBringupMacro 210 +#define RsvBringupBox 210 #define RsvOperator 1000 #define RsvBNot 1001