本帖最后由 daiyu116 于 2011-6-16 19:00 编辑
回复 1# m765555
这样试试呢?
#include <INet.au3>
$http = 'http://baidu.lehecai.com/lottery/draw/list/50?lottery_type=50&page=1&ds=2011-01-01&de=2011-06-15'
$sData = InetRead($http)
;$sData = _INetGetSource($http)
$Source = BinaryToString($sData, 4)
MsgBox(0, 0, $Source)
ClipPut($Source)
$ym=ClipGet()
infolog($ym,"c:\1.Log")
;创建记录文件并写入内容
Func infolog($string,$filePath_name)
$file =FileOpen($filePath_name,137)
; 检查打开的文件可写
If $file = -1 Then
MsgBox(0, "错误", "不能创建或打开文件"&$filePath_name&",如无该文件,请手动创建"&$filePath_name&".如无法创建,程序也将继续运行!")
Return -1
EndIf
$writeok=FileWriteLine($filePath_name,$string & @CRLF)
If $writeok=1 Then
FileClose($filePath_name)
Return 1
Else
MsgBox(0, "错误","向文件"&$filePath_name&"写入错误,请检查文件是否只读属性!但并不妨碍程序继续运行!")
Return 0
EndIf
EndFunc
|