|
求解啊,很短很简单的一段代码,无限循环,就是大漠插件找图,找到就截图保存,无限循环,开几个小时就会没反应了,不知道为什么,实在看不出来问题在哪,求大神帮忙。。。
HotKeySet("{F10}", "kaishi")
Global $ztx, $zty, $ckx1, $cky1, $ckx2, $cky2
While 1
Sleep(100)
WEnd
Func kaishi()
TrayTip("", "开始", 3)
Sleep(3000)
TrayTip("", "", 0)
Local $size = WinGetPos("九阴真经")
$ckx1 = $size[0]
$cky1 = $size[1]
$ckx2 = $size[0] + $size[2]
$cky2 = $size[1] + $size[3]
While 1
$jh1 = $dm.FindPicE($ckx1 + 180, $cky1 + 70, $ckx1 + 610, $cky1 + 425, $dqml & "\1.bmp", "303030", 1, 1)
$jh1 = StringSplit($jh1, "|", 2)
$jh2 = $dm.FindPicE($ckx1 + 180, $cky1 + 70, $ckx1 + 610, $cky1 + 425, $dqml & "\2.bmp", "303030", 1, 1)
$jh2 = StringSplit($jh2, "|", 2)
If $jh1[1] > 0 Or $jh2[1] > 0 Then
$shijian = @MON & "月" & @MDAY & " " & @HOUR & "时" & @MIN & "分" & @SEC
_ScreenCapture_Capture($dqml & "\记录\" & $shijian & ".bmp", $ckx1, $cky1, $ckx2, $cky2)
TrayTip("", "截图成功。。", 0)
Sleep(6000)
TrayTip("", "", 0)
EndIf
Sleep(1000)
WEnd
EndFunc |
|