Jump to content
dersiniar

pixelsearch helps needed

Recommended Posts

Func _DC()
BlockInput($BI_ENABLE)
 PixelSearch($TestBlock[0], $TestBlock[1], $TestBlock1[0], $TestBlock1[1], $Colour)
If Not @error Then
   GUICtrlSetData($info, "test pass")
Sleep(10)
Else
Sleep(1000)
 ; do smthing
EndIf
EndFunc


Func _TestBlock()
GUICtrlSetData($info, "Select Color")
GUICtrlSetColor($info, $COLOR_RED)
GUICtrlSetFont($info, 14)
Do
Sleep(10)
Until  _IsPressed("01")
$TestBlock = MouseGetPos()
Sleep(200)
$Colour = MouseGetPos()
Sleep(200)
GUICtrlSetData($Count, "Current color code is " & $Colour)
Sleep(50)
GUICtrlSetData($info, $TestBlock)
Sleep(50)
EndFunc

Hello guys.

I need to select pixel cordinates and color with mouse click. But it doesnt look like it works. whats wrong with code?

Cordinates works, cos i used this before with fixed color code, but now i need maouseclick to save color code. I do not get any errors, It just not find the code

Share this post


Link to post
Share on other sites
6 minutes ago, dersiniar said:
Func _DC()
BlockInput($BI_ENABLE)
 PixelSearch($TestBlock[0], $TestBlock[1], $TestBlock1[0], $TestBlock1[1], $Colour)
If Not @error Then
   GUICtrlSetData($info, "test pass")
Sleep(10)
Else
Sleep(1000)
 ; do smthing
EndIf
EndFunc


Func _TestBlock()
GUICtrlSetData($info, "Select Color")
GUICtrlSetColor($info, $COLOR_RED)
GUICtrlSetFont($info, 14)
Do
Sleep(10)
Until  _IsPressed("01")
$TestBlock = MouseGetPos()
Sleep(200)
$Colour = MouseGetPos()
Sleep(200)
GUICtrlSetData($Count, "Current color code is " & $Colour)
Sleep(50)
GUICtrlSetData($info, $TestBlock)
Sleep(50)
EndFunc

Hello guys.

I need to select pixel cordinates and color with mouse click. But it doesnt look like it works. whats wrong with code?

Cordinates works, cos i used this before with fixed color code, but now i need maouseclick to save color code. I do not get any errors, It just not find the code

Figured out my own, didnt use PixelGetColor

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...