Dim a1,a2,a3,s
Set a1=createobject("scripting.filesystemobject")
Set a3=createobject("wscript.shell")
s=a3.specialfolders("desktop")
Set a2=a1.opentextfile(s&"\new.txt",2,true)
a2.writeline "the hex is'"&hex(98)&"'"
a2.close
总是停在倒数第2行代码,但我把hex(98)先赋值给一个变量,改过来就可以通过,想不通是为什么,希望指点一下
Dim a1,a2,a3,s
Set a1=createobject("scripting.filesystemobject")
Set a3=createobject("wscript.shell")
s=a3.specialfolders("desktop")
Set a2=a1.opentextfile(s&"\new.txt",2,true)
a2.writeline "the hex is'"& hex(98) &"'"
a2.close
在我的电脑是通过的,倒数第二句 a2.writeline "the hex is'"& hex(98) &"'"
在&符号前后都要打上空格就行了.