Sign in to follow this  
Followers 0
toothyXdip

pixel detection?

2 posts in this topic

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???

Thanks!,

Toothy


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

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
    Sleep(100)
    If PixelSearch(0, 0, 10, 20, 0xFFFFFF) = 1 Then
        HotKeySet("{F1}", "Failure")
    Else
        HotKeySet("{F1}", "Success")
    EndIf
WEnd

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!")
EndFunc

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!")
EndFunc

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

:whistle:

Kurt


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  
Followers 0