Show page source of FrontPage #86068

= abstruct =

vbsutilsは、BATでは機能が足りないけれどVBScriptは使い勝手が悪いというジレンマをほんの少し解消しようと試みたライブラリです。
次のような機能を持っています。

* Array utilities
* Logging framework
* UNIX shell like procedures

= 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") )
}}}

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