wuluck 发表于 2009-6-24 00:35:45

程序带验证码?有没办法提取出来?

网页带验证码很多人研究了,程序带验证码有没人研究过
qq对战平台

$var = ControlGetText("验证码", "", "Static") 好像获取不到东西......

passkalilo 发表于 2009-6-24 11:03:23

_ScreenCapture

passkalilo 发表于 2009-6-24 11:05:17

先计算坐标再
_ScreenCapture_Capture

lynfr8 发表于 2009-6-24 13:01:23

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <ScreenCapture.au3>
#include <GuiConstantsEx.au3>

Opt('MustDeclareVars', 1)
Local $hGUI, $hWnd, $hGraphic, $hBrush, $hFormat, $hFamily, $hFont, $tLayout,$Pic1,$Button1,$Label1,$Label2,$nMsg,$size
Local $sString = "AU3论坛作品", $aInfo

GUISetState()
$hGUI= GUICreate("窗体1", 413, 298, 302, 218)
$hWnd = WinGetHandle("窗体1")
$Pic1 = GUICtrlCreatePic(@ScriptDir & "\test.jpg", 0, 0, 409, 209, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
$Button1 = GUICtrlCreateButton("保存", 40, 240, 97, 33, $WS_GROUP)
$Label1 = GUICtrlCreateLabel("AU3论坛作品", 112, 16, 120, 28)
GUICtrlSetFont(-1, 14, 400, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0xFF0000)
$Label2 = GUICtrlCreateLabel("2009年5月27日", 264, 160, 134, 28)
GUICtrlSetFont(-1, 14, 400, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0xFF0000)
GUICtrlSetBkColor ( $Label1, $GUI_BKCOLOR_TRANSPARENT )
GUICtrlSetBkColor ( $Label2, $GUI_BKCOLOR_TRANSPARENT )
GUISetState(@SW_SHOW)


While 1
      $nMsg = GUIGetMsg()
      Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit
                Case $Button1
               _Main()
                        
      EndSwitch
      WEnd

Func _Main()
    Local $hBmp
      $size = WinGetPos("窗体1")
;MsgBox(0, "活动窗口状态 (X坐标,Y坐标,宽度,高度):", $size & ",    " & $size & ",   " & $size & ",   " & $size)
   _ScreenCapture_Capture (@ScriptDir & "\save.jpg", $size,$size+24,$size+$size-10,$size+$size-91)

EndFunc
给个例子参考下吧

wuluck 发表于 2009-6-26 13:57:20

多谢,.研究去了
页: [1]
查看完整版本: 程序带验证码?有没办法提取出来?