为什么程序分开能运行?合并运行异常?
本帖最后由 wuluck 于 2009-8-1 13:30 编辑#include <IE.au3>
$oIE = _IECreate ("http://www.timedate.cn/worldclock/ti.asp")
$sText = _IEBodyReadText ($oIE)
$file = FileOpen("nod32id.txt", 2)
FileWrite($file, $sText)
$file1 = FileOpen("nod32id.txt", 0)
$chars = FileRead($file1,4)
MsgBox(0, "读取的字符:", $chars)
获取网络的年份...
#include <IE.au3>
$oIE = _IECreate ("http://www.timedate.cn/worldclock/ti.asp")
$sText = _IEBodyReadText ($oIE)
$file = FileOpen("nod32id.txt", 2)
FileWrite($file, $sText)
和
$file1 = FileOpen("nod32id.txt", 0)
$chars = FileRead($file1,4)
MsgBox(0, "读取的字符:", $chars)
分开运行正常.合并之后出不来时间 因为你没有 FileClose($file) 要获得同样的结果可以简单点:#include <IE.au3>
$oIE = _IECreate ("http://www.timedate.cn/worldclock/ti.asp")
$sText = _IEBodyReadText ($oIE)
MsgBox(0, "读取的字符:", StringLeft($sText, 4))
页:
[1]