How to get an HTA application to accept command line arguments?

独自空忆成欢 提交于 2019-12-05 16:04:14

Your script section contains an Option Explicit statement. That makes defining variables before you can use them mandatory. Add a line Dim arrCommands, i to your procedure:

Sub Window_onLoad
    Dim arrCommands, i
    arrCommands = Split(ITTool.commandLine, chr(34))
    For i = 3 to (Ubound(arrCommands) - 1) Step 2
        MsgBox arrCommands(i)
    Next
End Sub
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!