topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday March 28, 2024, 7:20 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - mydo [ switch to compact view ]

Pages: [1]
1
This is awesome, thanks so much. 

I feel like this script will be a lot more useful now to a lot of people.  I personally use it for detecting changes in a software which does not have support for notifications.  I have it set up to send me an email anything the color is NOT detected in a pixel 😊

2
"Would it be possible to change PixelNotifier such that an alert is triggered when the monitored pixel changes FROM it's current color value as opposed to when it changes TO a user defined, (anticipated), color value?"

script is by: skrommel, PixelNotifier,  www.dcmembers.com/skrommel/download/pixelnotifier/


Code: Text [Select]
  1. #SingleInstance,Force
  2.  
  3. SysGet,workarea,MonitorWorkArea
  4.  
  5. applicationname=PixelNotifier
  6.  
  7. Gosub,READINI
  8. Gosub,ACTIVATEALL
  9.  
  10. LOOP:
  11. Loop,%alarmscount%
  12. {
  13.   Sleep,500
  14.   If active_%A_Index%=0
  15.     Continue
  16.   If triggered_%A_Index%=1
  17.     Continue
  18.   x:=alarms_%A_Index%_1
  19.   y:=alarms_%A_Index%_2
  20.   pixelcolor:=alarms_%A_Index%_3
  21.   relative:=alarms_%A_Index%_4
  22.   If relative=1
  23.     CoordMode,Pixel,Screen
  24.   Else
  25.     CoordMode,Pixel,Relative
  26.   PixelGetColor,readpixelcolor,x,y,RGB
  27.   StringTrimLeft,readpixelcolor,readpixelcolor,2
  28.   If readpixelcolor<>%pixelcolor%
  29.     Continue
  30.   triggered_%A_Index%=1
  31.   message:=alarms_%A_Index%_5
  32.   fullscreencolor:=alarms_%A_Index%_6
  33.   Gui,%A_Index%:+Owner -Resize -SysMenu -MinimizeBox -MaximizeBox -Disabled +Caption +Border -ToolWindow
  34.   Gui,%A_Index%:Color,%fullscreencolor%
  35.   Gui,%A_Index%:Add,Button,X320 Y240 Default GOK_%A_Index%,%message%
  36.   Gui,%A_Index%:Show,X-4 Y-4 W%workareaRight% H%workareaBottom%,%applicationname% %A_Index%
  37.   SetTimer,TRIGGERED_%A_Index%,5000
  38.   Gosub,TRIGGERED_%A_Index%    
  39. }
  40. Goto,LOOP
  41.  
  42.  
  43. TRIGGERED_9:
  44. triggered=9
  45. Goto,TRIGGERED
  46. TRIGGERED_8:
  47. triggered=8
  48. Goto,TRIGGERED
  49. TRIGGERED_7:
  50. triggered=7
  51. Goto,TRIGGERED
  52. TRIGGERED_6:
  53. triggered=6
  54. Goto,TRIGGERED
  55. TRIGGERED_5:
  56. triggered=5
  57. Goto,TRIGGERED
  58. TRIGGERED_4:
  59. triggered=4
  60. Goto,TRIGGERED
  61. TRIGGERED_3:
  62. triggered=3
  63. Goto,TRIGGERED
  64. TRIGGERED_2:
  65. triggered=2
  66. Goto,TRIGGERED
  67. TRIGGERED_1:
  68. triggered=1
  69. Goto,TRIGGERED
  70. TRIGGERED:
  71. sound:=alarms_%triggered%_7
  72. SoundPlay,%sound%
  73. ;WinSet,Top,,%applicationname% %triggered%
  74. WinActivate,%applicationname% %triggered%
  75. Return
  76.  
  77.  
  78. OK_9:
  79. ok=9
  80. Goto,BUTTON
  81. OK_8:
  82. ok=8
  83. Goto,BUTTON
  84. OK_7:
  85. ok=7
  86. Goto,BUTTON
  87. OK_6:
  88. ok=6
  89. Goto,BUTTON
  90. OK_5:
  91. ok=5
  92. Goto,BUTTON
  93. OK_4:
  94. ok=4
  95. Goto,BUTTON
  96. OK_3:
  97. ok=3
  98. Goto,BUTTON
  99. OK_2:
  100. ok=2
  101. Goto,BUTTON
  102. OK_1:
  103. ok=1
  104. Goto,BUTTON
  105. BUTTON:
  106. SetTimer,TRIGGERED_%ok%,Off
  107. Gui,%ok%:Destroy
  108. active_%ok%=0
  109. Gosub,TRAYMENU
  110. Return
  111.  
  112.  
  113. TOGGLE_9:
  114. TOGGLE_8:
  115. TOGGLE_7:
  116. TOGGLE_6:
  117. TOGGLE_5:
  118. TOGGLE_4:
  119. TOGGLE_3:
  120. TOGGLE_2:
  121. TOGGLE_1:
  122. menu:=A_ThisMenuItemPos-2
  123. If active_%menu%=0
  124. {
  125.   active_%menu%=1
  126.   triggered_%menu%=0
  127.   Gosub,TRAYMENU
  128. }
  129. Else
  130. {
  131.   Gosub,OK_%menu%
  132. }
  133. Return
  134.  
  135.  
  136. ADD:
  137. Gosub,DEACTIVATEALL
  138. Loop
  139. {
  140.   CoordMode,Pixel,Screen
  141.   CoordMode,Mouse,Screen
  142.   MouseGetPos,sx,sy
  143.   PixelGetColor,readpixelcolor,sx,sy,RGB
  144.   StringTrimLeft,readpixelcolor,readpixelcolor,2
  145.   CoordMode,Mouse,Relative
  146.   MouseGetPos,x,y
  147.   ToolTip,Color:`t%readpixelcolor%`nScreenCoord:`t%sx% %sy%`nWindowCoord:`t%x% %y%`n`nPress`tto add`n1=`tScreenCoord`n2=`tWindowCoord`nEsc=Cancel
  148.   GetKeyState,screen,1,P
  149.   If screen=D
  150.   {
  151.     FileAppend,`n%sx%`,%sy%`,%readpixelcolor%`,1`,Message`,FFFFFF`,C:\Windows\Ding.wav,%applicationname%.ini
  152.     ToolTip,
  153.     Gosub,SETTINGS
  154.     Break  
  155.   }
  156.   GetKeyState,window,2,P
  157.   If window=D
  158.   {
  159.     FileAppend,`n%x%`,%y%`,%readpixelcolor%`,2`,Message`,FFFFFF`,C:\Windows\Ding.wav,%applicationname%.ini
  160.     ToolTip,
  161.     Gosub,SETTINGS
  162.     Break  
  163.   }
  164.   GetKeyState,esc,Esc,P
  165.   If esc=D
  166.   {
  167.     ToolTip,
  168.     Break
  169.   }
  170. }
  171. Return
  172.  
  173.  
  174. SETTINGS:
  175. Gosub,DEACTIVATEALL
  176. Gosub,READINI
  177. Run,%applicationname%.ini
  178. Return
  179.  
  180.  
  181. READINI:
  182. IfNotExist,%applicationname%.ini
  183. {
  184. ini=`;%applicationname%.ini
  185. ini=%ini%`n`;
  186. ini=%ini%`n`;Syntax:
  187. ini=%ini%`n`;
  188. ini=%ini%`n`;x,y,pixelcolor,relative,message,fullscreencolor,sound
  189. ini=%ini%`n`;
  190. ini=%ini%`n`; x                               Horizontal positon of the pixel to watch
  191. ini=%ini%`n`; y                               vertical positon of the pixel to watch
  192. ini=%ini%`n`; pixelcolor=000000-FFFFFF        RGB-color of the pixel to watch
  193. ini=%ini%`n`; relative=1,2                    Find pixel relative to 1=the screen or 2=the active window
  194. ini=%ini%`n`; message                         The message to display
  195. ini=%ini%`n`; fullscreencolor=000000-FFFFFF   Color of the fullscreen notification
  196. ini=%ini%`n`; sound                           Path to the WAV-file
  197. ini=%ini%`n`;
  198. ini=%ini%`n`;Example:
  199. ini=%ini%`n`;
  200. ini=%ini%`n`;0,0,FFFFFF,White color detected!,0,0000FF,C:\Windows\Media\Ding.wav
  201. ini=%ini%`n`;  Watches the screenposition 0,0 for the color white and plays a sound and
  202. ini=%ini%`n`;  displays a blue message window with the text White color detected!
  203. ini=%ini%`n
  204. ini=%ini%`n200,200,FFFFFF,1,White color detected!,0000FF,C:\Windows\Media\Ding.wav
  205. ini=%ini%`n400,400,FFFFFF,1,White color detected!,FF0000,C:\Windows\Media\Ding.wav
  206. FileAppend,%ini%,%applicationname%.ini
  207. ini=
  208. }
  209. alarmscount=0
  210. Loop,Read,%applicationname%.ini
  211. {
  212.   IfInString,A_LoopReadLine,`;
  213.     Continue
  214.   IfNotInString,A_LoopReadLine,`,
  215.     Continue
  216.   alarmscount+=1
  217.   StringSplit,alarms_%alarmscount%_,A_LoopReadLine,`,
  218. }
  219. Return
  220. ...
  221. ...
  222. ...
  223. ...

3
Finished Programs / Re: DONE: Universal Notifier (UN)
« on: February 27, 2019, 06:29 PM »
Would it be possible to change PixelNotifier such that an alert is triggered when the monitored pixel changes FROM it's current color value as opposed to when it changes TO a user defined, (anticipated), color value?
-Subbrilliant (June 25, 2009, 08:08 PM)

I know its an old thread but can anyone possibly answer this question above?  I as well would like it to notify when color is different, not same.

Thanks.


Pages: [1]