Show page source of FrontPage #92558

= abstruct =

vbsutilsは、VBScriptをBATの代わりに利用するための補助ライブラリです。
次のような機能を持っています。

* Array utilities
* Logging framework
* UNIX shell like procedures
* c like formatter

= examples =
== Array utilities ==
Array utilitiesには、配列を操作するためのプロシージャが用意されています。

examples)
{{{ code vba
ary = array_create()
array_push ary, 0
array_push ary, 2
for each v in array_filter( ary, "value > 0" )
   wscript.echo v
next
}}}

== Logging framework ==
Logging frameworkは、log4jライクなログ機能を提供します。

examples)
{{{ code vba
set logger = log_create_simple("root", "trace.log", LOG_LEVEL_INFO )
log_trace logger, "trace"
log_info logger, "error"
}}}

== UNIX shell like procedures  ==
UNIX shell like proceduresは、UNIX shellのようなプロシージャを提供します。

examples)
{{{ code vba
call shell_unprefix()

' directory
cd "c:"
echo pwd()

' file
xargs cat( array("f1.txt", "f2.txt"), nothing ), "wscript.echo line", nothing

if not test("-f", "file.txt") then
   echo touch(now(), "file.txt").LastModifiedDate
end if

' jobs
wait array( exec("calc"), exec("calc") )
}}}

== C like formatter ==
C like formatterは、printf/sprintf/fprintfを提供します。
{{{ code vba
wscript.echo sprintf("formatt%+10.1f", array(100.15) )
}}}

[[ReleaseList]]
[[RecentTickets(limit=5)]]