JellyFish666 Posted December 7, 2008 Posted December 7, 2008 (edited) I was bored don't ask lol, I plan on adding more when I am bored can't think of the rest at the moment expandcollapse popupMsgBox(0 , "" , _MonitorPixel(200 , 200 , "" , 1)) _MonitorPixel(200 , 200 , "" , 2) _MonitorPixel(200 , 200 , 0xFFFFFF , 3) #cs Monitor Pixel Return 1 = Pixel Color Return 2 = Wait for Pixel Change Return 3 = Wait for Pixel Change Certain Color #CE Func _MonitorPixel($MonPixX , $MonPixY , $MonPixColor , $MonPixDat) ; Get initial checksum $CheckSum = PixelChecksum(0 , 0 , $MonPixX, $MonPixY) If $MonPixDat = 1 Then Return PixelGetColor($MonPixX , $MonPixY) ElseIf $MonPixDat = 2 Then While $CheckSum = PixelChecksum(0 , 0 , $MonPixX, $MonPixY) Sleep(@DesktopRefresh) ;change as needed WEnd _MyFunction(1) ;if needed ElseIf $MonPixDat = 3 Then If $MonPixColor = "" Then Exit Else Do $MonColor = PixelGetColor($MonPixX , $MonPixY) Sleep(@DesktopRefresh) ;change as needed Until $MonColor = $MonPixColor _MyFunction(2) EndIf Else Exit EndIf EndFunc Func _MyFunction($MyFunc) If $MyFunc = 1 Then MsgBox(0, "", "Something in the region has changed!") ElseIf $MyFunc = 2 Then MsgBox(0, "", "Your Color has been found!") Else Exit EndIf EndFunc Edited December 7, 2008 by JellyFish666
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