Jump to content

reese646

Members
  • Posts

    7
  • Joined

  • Last visited

Everything posted by reese646

  1. hi, just checking back in on the fly so can't sort any pictures out at the minute, as asked about the change in colour I'd say the transparency is only 5-8 percent and so is only very mildly affecting the base colour as a light shimmer if you know what I mean, similar I suppose to windows aero transparency, but this very slight pixel tinting is enough obviously to give a false positive, hence my thinking that if a pixelsearch could be implemented after the pixelchecksum as a secondary condition then it would solve the problem, implementing it is the current problem, changing the colour variation in the pixelsearch variables is something I can play with once I've got something to work with. Have tried a few things and worked my way through some of the tutorials and its really interesting, but I'm struggling to apply this knowledge so far to the problem in hand. Many thanks
  2. Right I've had a good time this morning, and my first post resulted in a great solution to an alarm for changes to a region, I have tidied that thread up and marked it as solved as the questions I was additionally asking we're going of the original topic and I only have one more message left today? (any help on getting aditional messages would be appreciated). Anyway Ive took this code. ; Provide a way to exit HotKeySet("{+}", "On_Exit") ;uses the + key to exit the program ; Get an initial checksum $nCurr_Checksum = PixelChecksum(0, 0, 400, 400);alter this region to the region requiring monitoring ; Start the loop While 1 ; Get a new checksum $nNew_Checksum = PixelChecksum(0, 0, 400, 400) ;alter this to match the PixelCheckSum above ; See if the area has changed If $nNew_Checksum <> $nCurr_Checksum Then ; If so then notify SoundPlay(@WindowsDir & "\Media\notify.wav", 1) ;\media\notify.wav can be changed to any other audible file ConsoleWrite("!Changed" & @CRLF) ; And reset the checksum to check against next time round $nCurr_Checksum = $nNew_Checksum EndIf ; Wait 1 sec and do it all again Sleep(400) ;in milliseconds altering this changes how quickly the script refreshes WEnd Func On_Exit() Exit EndFunc this provides an alarm for an area should it change, and resets once the alarm has sounded. The problem is transparency, the messenger window I'm monitoring has a transparency so things behind it are setting off the alarm, so I believe I need to add a PixelSearch to the code, have tried a few and getting errors, tried this and no errors, but no alarm, and help appreciated. ; Provide a way to exit HotKeySet("{+}", "On_Exit") ;uses the + key to exit the program ; Get an initial checksum $nCurr_Checksum = PixelChecksum(2129, 448, 2220, 1200);alter this region to the region requiring monitoring ; Start the loop While 1 ; Get a new checksum $nNew_Checksum = PixelChecksum(2129, 448, 2220, 1200) ;alter this to match the PixelCheckSum above ; See if the area has changed If $nNew_Checksum <> $nCurr_Checksum And PixelSearch (2129, 448, 2220, 1200, 0x252424 ,2 ) Then ; If so then notify SoundPlay(@WindowsDir & "\Media\notify.wav", 1) ;\media\notify.wav can be changed to any other audible file ConsoleWrite("!Changed" & @CRLF) ; And reset the checksum to check against next time round $nCurr_Checksum = $nNew_Checksum EndIf ; Wait 1 sec and do it all again Sleep(400) ;in milliseconds altering this changes how quickly the script refreshes WEnd Func On_Exit() Exit EndFunc
  3. yes that does perfectly, I am intrigued by this simple script to see what can actually be achieved, it seems like its quite a powerful tool, though as said my coding skills are limited to basic html, a little php and some sql. will have a look at the tutorials definitely. Have edited the script now, leaving in every comment added by the main contributor, this works perfectly and has been edited as to use the + key exit, and has a slightly quicker response time. ; Provide a way to exit HotKeySet("{+}", "On_Exit") ;uses the + key to exit the program ; Get an initial checksum $nCurr_Checksum = PixelChecksum(0, 0, 400, 400);alter this region to the region requiring monitoring ; Start the loop While 1 ; Get a new checksum $nNew_Checksum = PixelChecksum(0, 0, 400, 400) ;alter this to match the PixelCheckSum above ; See if the area has changed If $nNew_Checksum <> $nCurr_Checksum Then ; If so then notify SoundPlay(@WindowsDir & "\Media\notify.wav", 1) ;\media\notify.wav can be changed to any other audible file ConsoleWrite("!Changed" & @CRLF) ; And reset the checksum to check against next time round $nCurr_Checksum = $nNew_Checksum EndIf ; Wait 1 sec and do it all again Sleep(400) ;in milliseconds altering this changes how quickly the script refreshes WEnd Func On_Exit() Exit EndFunc I think this makes sense to the more experienced as I thought I'd explain my bits also so anyone else can use this as its really really handy and amazingly simple, I'm chuffed to bits with it and if anything I've put is wrong in the code (which is quite possible ) please edit it
  4. thats seems to be great, didn't work at first and had me checking all my sound settings the ; on line 14 needed removing to enable the sound it would seem. is there any way to change the response time of the sound upon change, make it faster or slower, would you just change the sleep variable? many thanks again as this is pretty much there as far as what I need
  5. you beat me to one my next question which was is this the right way to add an exit key HotKeySet( " {+}" , "Exit") $checksum = PixelChecksum(2000, 500, 2300, 800) While 1 If PixelChecksum(2000, 500, 2300, 800) <> $checksum Then SoundPlay(@WindowsDir & "\Media\notify.wav", 1) ExitLoop EndIf Sleep(100) WEnd Func Exit() Exit EndFunc Your code is beyond my current understanding I'll be honest but I get the general idea, I'll have a quick look at it and get straight back, thanks for the really prompt help too
  6. Hi I'm basically trying to do exactly what I've said, I have a 3 screen system and am using a message software that is a pain when it comes to notifications but when turned off i get no notifications, I literally want to select the region where my contact list is and get a sensible noise whenever someone logs on or off, it has to be discrete as not to disturb me while working basically and on looking something like this seemed the simple solution
  7. Hi there, completely new to coding, and trying to solve a problem and this seems the best solution. I want a sound to go off if a region on the pc screen changes in any way, this I have achieved with a simple pixelchecksum, and i have the sound playing, the problem is that currently as you'll see the script once activated makes a sound then ends, I want the script to start again after one second. I tried just removing the exitloop but all that happened was that it the region changed from its original state it would sound the alarm every second infinitely. What I want is for the script to check the region, if theres no change reset and restart after one second, if there is a change sound the alarm, wait one second do a fresh check of the region so it takes into account the change and then monitors for another change. I tried a while loop but my code was wrong and I'm unsure if this would cure it, and a continueloop doesn't fit my need from the documentation, its a very small script so hopefully someone could help. $checksum = PixelChecksum(2000, 500, 2300, 800) While 1 If PixelChecksum(2000, 500, 2300, 800) <> $checksum Then SoundPlay(@WindowsDir & "\Media\notify.wav", 1) ExitLoop EndIf Sleep(100) WEnd many many thanks
×
×
  • Create New...