0
在我的HTA文件中,我试图实现文件浏览器按钮,但由于某种原因,HTA抱怨未终止的字符串常量。我查用VBS文件中的代码和它的作品,但不是在HTAHTA - 未终止的字符串contants错误
代码片断
Sub StartExec_OnClick
Dim objShell, objFile, BrowseForFile
Set objShell = CreateObject("Shell.Application")
aa = "about:<input type=file id=FILE><script>FILE.click();new ActiveXObject('Scripting.FileSystemObject').GetStandardStream(1).WriteLine(FILE.value);close();resizeTo(0,0);</script>"
Set objFile = objShell.Exec("mshta.exe " & Chr(34) & aa & Chr(34))
BrowseForFile = objFile.StdOut.ReadLine
Set objFile=Nothing
Set objShell=Nothing
End Sub