找回密码
 加入
搜索
查看: 1405|回复: 0

[AU3基础] _WinHTTP_GetRespond的问题

  [复制链接]
发表于 2012-7-10 18:24:08 | 显示全部楼层 |阅读模式
本帖最后由 FlamesTsui 于 2012-7-10 18:25 编辑

我怎么使用_WinHTTP_GetRespond获取回来二进制只有4个字节??
#include "WinHttp_GetRespond.au3"
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 951, 546, 184, 116)
$Edit1 = GUICtrlCreateEdit("", 0, 0, 945, 497)
GUICtrlSetData(-1, "Edit1")
$Button1 = GUICtrlCreateButton("Button1", 16, 512, 75, 25)
$Button2 = GUICtrlCreateButton("Button2", 104, 512, 75, 25)
GUISetState(@SW_SHOW)
#endregion ### END Koda GUI section ###

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit
                Case $Button1
                        $MyOpen = _WinHttpOpen()
                        ;Local $Request[1] = ["$hRequest"]
                        $rContext = _WinHTTP_GetRespond($MyOpen, "http://www.baidu.com/")
                        MsgBox(0, "", BinaryLen($rContext[0]))
                        GUICtrlSetData($Edit1, BinaryToString($rContext[0]))
                        ;MsgBox(0,"Error",@error)
        EndSwitch
WEnd
不是像例子那样是HTML代码呢??
用的UDF是http://www.autoitx.com/thread-18528-1-1.html
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-9-20 11:43 , Processed in 0.076045 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表