Jump to content
Sign in to follow this  

pixel detection?

Recommended Posts


ok most of you probley already know about my post on making a hot key for a spot and when that spot changes color for it to send a key (This topic) But i think i might have a idea from some1 who made something that does the same thing. Pixel detection (is gray) if the spot turns any color of gray from a color it sends a key. Am i right???



---╔╦═╗╔╗'''╔╗╔═╦═╗╔╦═╗---╝╠═╣╝║'''║╝╝''''''╝╝║'''......''''''''''''''''''''''''''''''---╔╩═╩═╩═╩═══╩═╦═╩═╩══╦══════╗''''╔╩════════════╩══╗╔══╩══╗╔══╝ ''''''''''''''''''''''''''''''''''''''''''''''''''''║║'''''''''''''''║║ ''''''''''''''''''''''''''''''''''''''''''''''╔══╝╚══╗''''''║║''''''''''''''''''''''''''''''''''''''''''''''╚══════╝''''''╚╝

Share this post

Link to post
Share on other sites

Perhaps this small example will help, it basically changes hotkey functions on the fly if the pixelsearch succeeds/fails.

;Changing Hotkey functions on the fly
;By Kurt :)

While 1
    If PixelSearch(0, 0, 10, 20, 0xFFFFFF) = 1 Then
        HotKeySet("{F1}", "Failure")
        HotKeySet("{F1}", "Success")

Func Success()
    MsgBox(0,"","The pixel search succeeded, the hex color was found, therefore" & @CRLF & "F1 is know hotkeyed to this function. If this color isn't found, it" & @CRLF & "will immediately change functions!")

Func Failure()
    MsgBox(0,"","The hex color was not found! The hotkey is now set to this function." & @CRLF & "Don't worry, find the hex color again and the hotkeyset will change!")

That should give you an idea of how it can be done, you might need to play around with the pixelsearch coordinates/hex.



Awaiting Diablo III..

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
Sign in to follow this