Func _FindColorEx($iLeft, $iTop, $iRight, $iBottom, $szColor, $iType, $fSimilar, $Moove)
if Not IsObj($QMDispatch) Then $QMDispatch = ObjCreate("QMDispatch.QMFunction")
;MsgBox(0,"",$FoundPixel&" "& $FoundX & " " & $FoundY)
$FoundPixel = $QMDispatch.FindColor($iLeft, $iTop=1, $iRight, $iBottom, $szColor, $iType, $fSimilar)
$FoundX = Round($FoundPixel / 8192)
$FoundY = Mod($FoundPixel,8192)
If $FoundX > 0 Or $FoundY > 0 And Not $Moove Then
SetError(0)
$Found=_ArrayCreate(0)
$Found[0]=$FoundX
_ArrayAdd($Found,$FoundY)
Return ($Found)
ElseIf $FoundX > 0 Or $FoundY > 0 And $Moove Then
SetError(0)
_SetCursorPos($FoundX,$FoundY)
$Found=_ArrayCreate(0)
$Found[0]=$FoundX
_ArrayAdd($Found,$FoundY)
Return ($Found)
ElseIf $FoundX < 0 Or $FoundY < 0 Then
SetError("","",1)
EndIf
EndFunc
func _SetCursorPos($CursorX,$CursorY)
if Not IsObj($QMDispatch) Then $QMDispatch = ObjCreate("QMDispatch.QMFunction")
$QMDispatch.SetCursorPos($CursorX,$CursorY)
EndFunc
func _Delay($Time)
if Not IsObj($QMDispatch) Then $QMDispatch = ObjCreate("QMDispatch.QMFunction")
$QMDispatch.Delay($Time)
EndFunc
if Not IsObj($QMDispatch) Then $QMDispatch = ObjCreate("QMDispatch.QMFunction")
;MsgBox(0,"",$FoundPixel&" "& $FoundX & " " & $FoundY)
$FoundPixel = $QMDispatch.FindColor($iLeft, $iTop=1, $iRight, $iBottom, $szColor, $iType, $fSimilar)
$FoundX = Round($FoundPixel / 8192)
$FoundY = Mod($FoundPixel,8192)
If $FoundX > 0 Or $FoundY > 0 And Not $Moove Then
SetError(0)
$Found=_ArrayCreate(0)
$Found[0]=$FoundX
_ArrayAdd($Found,$FoundY)
Return ($Found)
ElseIf $FoundX > 0 Or $FoundY > 0 And $Moove Then
SetError(0)
_SetCursorPos($FoundX,$FoundY)
$Found=_ArrayCreate(0)
$Found[0]=$FoundX
_ArrayAdd($Found,$FoundY)
Return ($Found)
ElseIf $FoundX < 0 Or $FoundY < 0 Then
SetError("","",1)
EndIf
EndFunc
func _SetCursorPos($CursorX,$CursorY)
if Not IsObj($QMDispatch) Then $QMDispatch = ObjCreate("QMDispatch.QMFunction")
$QMDispatch.SetCursorPos($CursorX,$CursorY)
EndFunc
func _Delay($Time)
if Not IsObj($QMDispatch) Then $QMDispatch = ObjCreate("QMDispatch.QMFunction")
$QMDispatch.Delay($Time)
EndFunc
Комментарии
Отправить комментарий