次のコードの何が問題になっていますか? 3 番目の「else if」は「Do you even sleep?」とスキップします。
Dim Message, i
Dim strShutdown , lastword, strAbort
i = Hour (Time)
Message=InputBox("Hello and WHO might you be?","Virus")
if Message = " " and i >= 8 and i < 12 then
WScript.Echo "Good Morning."
CreateObject("WScript.Shell").Run """C:\Documents and Settings\Admin\My Documents\My Files\Designs\Vocaloid\Miku\Shimeji.jar"""
CreateObject("WScript.Shell").Run """C:\Documents and Settings\Admin\My Documents\My Files\Designs\Vocaloid\Miku\hello.vbs"""
Elseif Message = " " and i <= 17 and i >= 12 then
WScript.Echo "Good Afternoon."
CreateObject ("WScript.Shell").Run """C:\Documents and Settings\Admin\My Documents\My Files\Designs\Vocaloid\Miku\Shimeji.jar"""
CreateObject ("WScript.Shell").Run """C:\Documents and Settings\Admin\My Documents\My Files\Designs\Vocaloid\Miku\hello.vbs"""
Elseif Message = " " and i >= 18 and i < 20 then
WScript.Echo "Good Evening."
CreateObject ("WScript.Shell").Run """C:\Documents and Settings\Admin\My Documents\My Files\Designs\Vocaloid\Miku\Shimeji.jar"""
CreateObject ("WScript.Shell").Run """C:\Documents and Settings\Admin\My Documents\My Files\Designs\Vocaloid\Miku\hello.vbs"""
Elseif Message = " " and i >= 20 and i < 8 then
WScript.Echo "Do you even sleep ?"
CreateObject ("WScript.Shell").Run """C:\Documents and Settings\Admin\My Documents\My Files\Designs\Vocaloid\Miku\Shimeji.jar"""
CreateObject ("WScript.Shell").Run """C:\Documents and Settings\Admin\My Documents\My Files\Designs\Vocaloid\Miku\hello.vbs"""
Else
WScript.Echo "Hmm.... Intruder huh... heh!!."
strShutdown = "shutdown.exe -s -t 60 -f"
set objShell = CreateObject("WScript.Shell")
objShell.Run strShutdown, 0, false
WScript.Sleep 100
lastword= Inputbox("Computer will shutdown in 60 seconds. Any last words?" , "Virus")
If lastword = "stop it" then
WScript.Echo "Hmpf!"
strAbort = "shutdown.exe -a"
set objShell = CreateObject("WScript.Shell")
objShell.Run strAbort, 0, false
else
WScript.Echo "Sorry and Goodbye"
End if
End if
また、MS Access に接続して、より多くの種類の返信やメッセージを受け取ることはできますか? Desktop Buddies に慣れている場合は、デスクトップ Buddies を作成して、デスクトップで操作できるだけでなく、チャットもできる部分を追加したいと思います。