将所有VBS文件合并为一个

时间:2017-09-26 20:12:07

标签: vbscript

我试图将我的所有VBS文件编译成一个,但我无法弄清楚如何做到这一点。

Set sapi = CreateObject("SAPI.SPvoice")
Set wshShell  = WScript.CreateObject("WScript.Shell")
Set ChosenVBS = InputBox("Enter your message", "Choose What to run.")
Set WshShell  = CreateObject("WScript.Shell")

Sub Speak
    Dim ProgramPath, WshShell, ProgramArgs, WaitOnReturn, intWindowStyle
    ProgramPath = "D:\Spam\Speak.vbs"
    ProgramArgs = ""
    intWindowStyle = 1
    WaitOnReturn = True
    WshShell.Run Chr(34) & ProgramPath & Chr(34) & Space(1) & ProgramArgs, _
        intWindowStyle, WaitOnReturn
End Sub

Call ChosenVBS

我目前是如何尝试的,Set适用于我要投入的所有代码。

0 个答案:

没有答案