我试图弄清楚如何使用.vbs 仅在一个条件下发生多个事件。(这里我尝试使用 case 语句。)是否有这样的命令,或者我必须为每一行重写命令?(这将通过在前面的代码行中激活它来在记事本上键入。)
msgbox("I was woundering how old you are.")
age=inputbox("Type age here.",,"")
Select Case age
Case age>24
x=age-24
WshShell.SendKeys "I see you are "&x&" years older than me."
WshShell.SendKeys "{ENTER}"
Case age<24
x=24-age
WshShell.SendKeys "I see you are "&x&" years younger than me."
WshShell.SendKeys "{ENTER}"
Case age=24
WshShell.SendKeys "Wow were the same age!"
WshShell.SendKeys "{ENTER} "
End Select