Harmonful Posted September 12, 2009 Share Posted September 12, 2009 (edited) Hi there!! Is it possible to do that when a pixel changes color an alarm sounds? thx Edited September 12, 2009 by Ryona Link to comment Share on other sites More sharing options...
Hawkwing Posted September 12, 2009 Share Posted September 12, 2009 $checksum = PixelChecksum(0, 0, 5, 5) While 1 If PixelChecksum(0, 0, 5, 5) <> $checksum Then SoundPlay(@WindowsDir & "\Media\notify.wav", 1) ExitLoop EndIf Sleep(100) WEnd Note: If \Media\notify.wav doesn't exist in the windows directory change it to a different sound file. The Wheel of Time turns, and Ages come and pass, leaving memories that become legend. Legend fades to myth, and even myth is long forgotten when the Age that gave it birth comes again. Link to comment Share on other sites More sharing options...
Harmonful Posted September 12, 2009 Author Share Posted September 12, 2009 (edited) were i put the Coordinates of the pixel?? Edited September 12, 2009 by Ryona Link to comment Share on other sites More sharing options...
Developers Jos Posted September 12, 2009 Developers Share Posted September 12, 2009 click on the PixelChecksum in the example and just read the page shown for all needed info. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Hawkwing Posted September 12, 2009 Share Posted September 12, 2009 (edited) In the first four parameters for pixelchecksum. It can either be a single pixel, or a box. The parameters I put in the second post have it checking a box of 5*5 pixels at the top left of your screen. If you wanted to check the very top left pixel you could do this. $checksum = PixelChecksum(0, 0, 0, 0) While 1 If PixelChecksum(0, 0, 0, 0) <> $checksum Then SoundPlay(@WindowsDir & "\Media\notify.wav", 1) ExitLoop EndIf Sleep(100) WEnd Edited September 12, 2009 by Hawkwing The Wheel of Time turns, and Ages come and pass, leaving memories that become legend. Legend fades to myth, and even myth is long forgotten when the Age that gave it birth comes again. Link to comment Share on other sites More sharing options...
Harmonful Posted September 12, 2009 Author Share Posted September 12, 2009 it cant be something using pixelget color... if color is (hex number) soundplay...??? Link to comment Share on other sites More sharing options...
Hawkwing Posted September 12, 2009 Share Posted September 12, 2009 (edited) Well, it could, but he doesn't care about what color the pixel changes too, just that it changes. So I thought I'd post code with pixelchecksum since you can also check a box of pixels. Edit: I am so unobservant. Didn't notice you were the op. Edited September 12, 2009 by Hawkwing The Wheel of Time turns, and Ages come and pass, leaving memories that become legend. Legend fades to myth, and even myth is long forgotten when the Age that gave it birth comes again. Link to comment Share on other sites More sharing options...
Harmonful Posted September 12, 2009 Author Share Posted September 12, 2009 how i check that?? with a mouse position checker or something like that? Link to comment Share on other sites More sharing options...
Hawkwing Posted September 12, 2009 Share Posted September 12, 2009 Not sure I know what your talking about. If your wandering how to check a box of pixels with pixelchecksum look at post #2. The Wheel of Time turns, and Ages come and pass, leaving memories that become legend. Legend fades to myth, and even myth is long forgotten when the Age that gave it birth comes again. Link to comment Share on other sites More sharing options...
Harmonful Posted September 12, 2009 Author Share Posted September 12, 2009 Look this is an image of something i like Link to comment Share on other sites More sharing options...
Hawkwing Posted September 12, 2009 Share Posted September 12, 2009 In that case you would want to use pixelgetcolor since the bar looks like it is shaded and has more than 1 color. While 1 If PixelGetColor( $x, $y , $winhandle) = $color Then SoundPlay(@WindowsDir & "\Media\notify.wav", 1) ExitLoop EndIf Sleep(100) WEnd The Wheel of Time turns, and Ages come and pass, leaving memories that become legend. Legend fades to myth, and even myth is long forgotten when the Age that gave it birth comes again. Link to comment Share on other sites More sharing options...
evilelf Posted September 12, 2009 Share Posted September 12, 2009 If ide seen this topic, I dont think ive would have helped. Your asking on this topic how and if you can even do it, Then in another topic your asking for us to make it... Tsk tsk, maybe i need sleep but sounds like you want us to make this and you r new member as of today.. Link to comment Share on other sites More sharing options...
Hawkwing Posted September 12, 2009 Share Posted September 12, 2009 I probably wouldn't have either normally. I guess I'm just feeling especially nice today. Note to new members: If you actually try something yourself and post code, people are a lot more likely to help you. The Wheel of Time turns, and Ages come and pass, leaving memories that become legend. Legend fades to myth, and even myth is long forgotten when the Age that gave it birth comes again. Link to comment Share on other sites More sharing options...
vissar2g Posted October 9, 2016 Share Posted October 9, 2016 Could anyone say how to get this to repeat more than once? The code works for when the color changes, but stops working if the color is changed again the second time. I tried injecting a for loop, but the alarm stops working. $checksum = PixelChecksum(0, 0, 5, 5) For $i = 5 To 1 Step -1 If PixelChecksum(0, 0, 5, 5) <> $checksum Then SoundPlay(@WindowsDir & "\Media\notify.wav", 1) ExitLoop EndIf Sleep(100) Next Link to comment Share on other sites More sharing options...
AutoBert Posted October 9, 2016 Share Posted October 9, 2016 use a loop: While 1 ;... wend ;or do ;... until 1 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