WindowsScriptHostでししゃも

事前準備

ActiveScriptRubyインスコ
ししゃもさんRubyのlibディレクトリに配置。
カレントディレクトリにsixamoディレクトリを作成。
sixamoディレクトリの中に、sixamo.txtを作成。内容は任意。

サンプルソース(sixamo_talk.wsf)

<?xml version="1.0" encoding="Shift-JIS" standalone="yes"?>
<package>
<?job error="true" debug="true"?>
<job id="sixamo_talk">
<object id="Shell" progid="WScript.Shell" />
<script language="VBScript">
Function VBInput(prompt, title, default)
  VBInput = InputBox(prompt, title, default)
  If(VBInput ="") Then
    Shell.Popup "終了します",0,"Sixamo Talk"
    WScript.Quit
  End If
End Function
</script>
<script language="RubyScript">
require 'sixamo'
def res(value)
  sixamo = Sixamo.new('sixamo')
  sixamo.memorize(value)
  msg = sixamo.talk(value)
  Shell.Popup(msg, 0, 'Sixamo Talk')
end
</script>
<script language="JScript">
<![CDATA[
var flg = true;
do {
  msg = VBInput("ししゃもさんに話しかけてください","Sixamo Talk", "");
  res(msg);
}
while(flg);
]]>
</script>
</job>
</package>

WSFなので、WindowsXPWindowsMeで動作します。
ていうか、WSFって使う人が少ないよね。