0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

vbsの作法 その95

Posted at

概要

vbsの作法、調べてみた。
vbs見つけたので、やってみた。

参考にしたページ

サンプルコード

Option Explicit
Dim sapi
Set sapi = CreateObject("SAPI.SpVoice")
sapi.Speak "契約書だよ。そこに名前を書きな。"
Dim name
name = InputBox("契約書")
If Len(name) = 0 Then
    Wscript.Arguments(-1)
End If
WScript.Sleep 1000
sapi.Speak "フン。" & name & "というのかい。贅沢な名だねぇ。"
Dim newName
Randomize
newName = Mid(name, Int(Len(name) * Rnd + 1), 1)
WScript.Sleep 1000
sapi.Speak "今からお前の名前は" & newName & "だ。"
WScript.Sleep 1000
sapi.Speak "いいかい、" & newName & "だよ。分かったら返事をするんだ、" & newName & "!!"
Set sapi = Nothing



以上

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?