dersiniar Posted April 29, 2019 Share Posted April 29, 2019 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 Link to comment Share on other sites More sharing options...
dersiniar Posted April 29, 2019 Author Share Posted April 29, 2019 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 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now