[Ttssh2-commit] [3650] PowerCycleマクロのサンプルコードを追加した。

svnno****@sourc***** svnno****@sourc*****
2009年 10月 19日 (月) 00:29:37 JST


Revision: 3650
          http://sourceforge.jp/projects/ttssh2/svn/view?view=rev&revision=3650
Author:   yutakapon
Date:     2009-10-19 00:29:37 +0900 (Mon, 19 Oct 2009)

Log Message:
-----------
PowerCycleマクロのサンプルコードを追加した。

Modified Paths:
--------------
    trunk/doc/en/html/macro/command/logopen.html
    trunk/doc/ja/html/macro/command/logopen.html


-------------- next part --------------
Modified: trunk/doc/en/html/macro/command/logopen.html
===================================================================
--- trunk/doc/en/html/macro/command/logopen.html	2009-10-18 14:58:58 UTC (rev 3649)
+++ trunk/doc/en/html/macro/command/logopen.html	2009-10-18 15:29:37 UTC (rev 3650)
@@ -76,5 +76,44 @@
 exit
 </pre>
 
+
+<pre class="macro-example">
+;
+; PowerCycle with logging
+;
+
+getenv 'USERNAME' username
+gettime timestr "%Y%m%d-%H%M%S"
+getdir mdir
+sprintf2 filename '%s\console_%s_%s.log' mdir username timestr
+
+logopen filename 0 0
+
+step = 0
+while 1
+  call show_step
+  sendln 'echo do something'
+  wait '$'
+  pause 2
+endwhile
+
+logclose
+exit
+
+:show_step
+step = step + 1
+gettime timestr
+sprintf2 str '[%d] %s' step timestr
+statusbox str 'counter'
+return
+</pre>
+
+<h2>Reference</h2>
+
+<a href="logwrite.html">logwrite</a><br>
+<a href="logclose.html">logclose</a><br>
+<a href="statusbox.html">statusbox</a><br>
+<a href="gettime.html">gettime</a><br>
+
 </body>
 </html>

Modified: trunk/doc/ja/html/macro/command/logopen.html
===================================================================
--- trunk/doc/ja/html/macro/command/logopen.html	2009-10-18 14:58:58 UTC (rev 3649)
+++ trunk/doc/ja/html/macro/command/logopen.html	2009-10-18 15:29:37 UTC (rev 3650)
@@ -76,5 +76,43 @@
 exit
 </pre>
 
+<pre class="macro-example">
+;
+; ƒƒOÌŽæ‚ð‚µ‚È‚ª‚çA’èŒ^ˆ—‚ð˜A‘±ŽÀs‚³‚¹‚éB
+;
+
+getenv 'USERNAME' username
+gettime timestr "%Y%m%d-%H%M%S"
+getdir mdir
+sprintf2 filename '%s\console_%s_%s.log' mdir username timestr
+
+logopen filename 0 0
+
+step = 0
+while 1
+  call show_step
+  sendln 'echo do something'
+  wait '$'
+  pause 2
+endwhile
+
+logclose
+exit
+
+:show_step
+step = step + 1
+gettime timestr
+sprintf2 str '[%d] %s' step timestr
+statusbox str 'counter'
+return
+</pre>
+
+<h2>ŽQÆ</h2>
+
+<a href="logwrite.html">logwrite</a><br>
+<a href="logclose.html">logclose</a><br>
+<a href="statusbox.html">statusbox</a><br>
+<a href="gettime.html">gettime</a><br>
+
 </body>
 </html>



Ttssh2-commit メーリングリストの案内