以下代碼有什麼問題?它跳過第三個「其他」,如果「你還睡覺嗎?」這段代碼爲什麼跳過第三個「else if」?
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,使它可以接受更多種類的回覆和消息嗎?如果您熟悉桌面好友,我想創建一個桌面好友,並添加不僅可以在桌面與其交互的部分,還可以與其聊天。
這個問題格式非常糟糕。請嘗試改進您發佈的代碼的格式。你也應該嘗試解釋你想要做什麼。請保留每個問題到自己的主題上,並且不要將屬於不同主題的多個問題包含在同一個問題中。 –
awww ..好的xD哈哈哈對不起xD –
不需要道歉,我們都是新來的StackOverflow一次。只要確保你保持你的下一個問題整潔和專業。 –