gpt4 book ai didi

vbscript - 转到 “Expected Statement”

转载 作者:行者123 更新时间:2023-12-02 10:54:04 25 4
gpt4 key购买 nike

我正在尝试使用GoTo命令(我不知道任何替代方法,并且可以批量工作)。每当我尝试加载程序时,都会出现此错误:

error screenshot

这基本上是错误所在(第11行第3列)

top:
input = InputBox("Enter normal text:", "Message Encrypt Style 2", "Text goes here")
If input = "" Then
Y = MsgBox("You inputed nothing!", vbRetryCancel+64, "Huh?")
If Y = 2 Then
WScript.Quit
Else
If Y = 4 Then
GoTo top
Else
If input = 2 Then
WScript.Quit

最佳答案

VBScript没有Goto语句,而且总有一种更清洁的方法。

Do
input = InputBox(...)

If IsEmpty(input) Or input = "2" Then
WScript.Quit
ElseIf input = "" Then
MsgBox "No input."
End If
Loop Until input <> ""

关于vbscript - 转到 “Expected Statement”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43483302/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com