如何中断VBScript

时间:2019-02-21 21:32:49

标签: vbscript windows-10

我从YouTube视频中复制了此聊天机器人,并想知道,是否可以通过某种方式(例如功能键)来中断代码?

Set shell = CreateObject("WScript.Shell")

strtext = InputBox("Write down your message you like to spam")
strtimes = InputBox("How many times do you like to spam?")
strspeed = InputBox("How fast do you like to spam? (1000 = one per sec, 100 = 10 per sec etc)")
strtimeneed = InputBox("How many SECONDS do you need to get to your victems input box?")
If Not IsNumeric(strtimes & strspeed & strtimeneed) Then
    MsgBox "You entered something else then a number on Times, Speed and/or Time need. shutting down"
    WScript.Quit
End If
strtimeneed2 = strtimeneed * 1000
Do
    MsgBox "You have " & strtimeneed & " seconds to get to your input area where you are going to spam."
    WScript.Sleep strtimeneed2
    shell.SendKeys ("Spambot activated" & "{enter}")
    For i=0 To strtimes
        shell.SendKeys (strtext & "{enter}")
        WScript.Sleep strspeed
    Next
    shell.SendKeys ("Spambot deactivated" & "{enter}")
    WScript.Sleep strspeed * strtimes / 10
    returnvalue = MsgBox("Want to spam again with the same info?", 36)
    If returnvalue = 6 Then
        MsgBox "Ok Spambot will activate again"
    End If
    If returnvalue = 7 Then
        MsgBox "Spambox is shutting down"
        WScript.Quit
    End If
Loop

0 个答案:

没有答案