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

[系统综合] 关于WinINet的问题,保存HTTPONLY属性的图片到本地!!

[复制链接]
发表于 2013-11-16 23:32:33 | 显示全部楼层 |阅读模式
本帖最后由 heavenm 于 2013-11-16 23:34 编辑
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <IE.au3>
#include <WinINet.au3>
#include <array.au3>
_IEErrorHandlerRegister()

Local $oIE = _IECreateEmbedded()
GUICreate("Embedded Web control Test", 640, 580, _
                (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2, _
                $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS + $WS_CLIPCHILDREN)
GUICtrlCreateObj($oIE, 10, 40, 600, 360)
Local $GUI_Button_Back = GUICtrlCreateButton("Back", 10, 420, 100, 30)
Local $GUI_Button_Forward = GUICtrlCreateButton("Forward", 120, 420, 100, 30)
Local $GUI_Button_Home = GUICtrlCreateButton("Home", 230, 420, 100, 30)
Local $GUI_Button_Stop = GUICtrlCreateButton("Stop", 340, 420, 100, 30)

GUISetState() ;显示GUI
Global $sSourceUrlName = "http://checkcode.taobao.com/auction/checkcode?sessionID=82432f67e91bf8e168148c8832c4e9cb"
;~ Global $sSourceUrlName = "http://www.baidu.com/img/bdlogo.gif"
_IENavigate($oIE, $sSourceUrlName)


; 等待用户关闭窗口
While 1
        Local $msg = GUIGetMsg()
        Select
                Case $msg = $GUI_EVENT_CLOSE
                        ExitLoop
                Case $msg = $GUI_Button_Home
                        $sLocalFileName = _WinINet_CreateUrlCacheEntry($sSourceUrlName)
                        $b=_WinINet_CommitUrlCacheEntry($sSourceUrlName,$sLocalFileName)
                        MsgBox(0, '', $b)
                        $a = _WinINet_GetUrlCacheEntryInfoEx($sSourceUrlName)
                        _ArrayDisplay($a)
                Case $msg = $GUI_Button_Back
                        _IEAction($oIE, "back")
                Case $msg = $GUI_Button_Forward
                        _IEAction($oIE, "forward")
                Case $msg = $GUI_Button_Stop
                        _IEAction($oIE, "stop")
        EndSelect
WEnd

GUIDelete()

Exit
目的是为了保存验证码,不想用剪切板的方法,因为可能会有冲突,还有保存的图片和原始图片的MD5不一样!!
求指教!
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-11-16 17:59 , Processed in 0.076934 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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