Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Find color
#1
Is there any reasoning behind why my macros that have if findcolor, have stopped working?

I'm using Windows Vista, so I understand recognizing colors are more difficult, but they worked before, but now no longer work.
Taking on Quick Macros one day at a time
#2
Macro
Code:
Copy      Help
Acc a=acc("Notification Area" "TOOLBAR" win("" "Shell_TrayWnd") "ToolbarWindow32" "" 0x1001)
if(!a.FindColor(ColorFromRGB(0 0 255) 0 0x3)) ret
out "found"

This works on my Vista PC.
#3
Macro
Trigger @11     Help - how to add the trigger to the macro
Code:
Copy      Help
Acc a=acc("Away" "PUSHBUTTON" win("" "Shell_TrayWnd") "ToolbarWindow32" "" 0x1001)
int w1=win("Away" "__oxFrame.class__")
int w2=win("AIM" "__oxFrame.class__")
int c=0x4677AD
spe 100
rep
,if(a.FindColor(c))
,,0.5
,,res w1
,,0.5
,,res w2
,,act w2
,,wait 5 WA w2
,,0.5
,,'At
,,0.5
,,act win("Text Message with" "__oxFrame.class__")
,,'SyouVhaveVbeenVmessaged.Y
,,end

When I get instant messaged then the window "Away" starts flashing orange, so I have it setup so if I get messaged while I'm not at my computer, that when the window starts flashing orange it does everything I have it setup to do. Am I doing something wrong?
Taking on Quick Macros one day at a time
#4
Vista taskbar is partially transparent and colors are blended with the background which is different every time.
#5
Yeah I noticed, but what I did was, I got the taskbar to flash the orange color and then I grabbed the color, with the same background I use now. It worked for about a month and now it suddenly stopped working.
Taking on Quick Macros one day at a time
#6
Try to capture color again, in button's bottom part.
#7
That's what I did before, I just retried it, and still same result.
Taking on Quick Macros one day at a time
#8
Macro
Code:
Copy      Help
int h=win("Notepad")
FlashWindow(h 1)
1
Acc a=acc("Untitled - Notepad" "PUSHBUTTON" win("" "Shell_TrayWnd") "ToolbarWindow32" "" 0x1001)
int c=0x1179c3
if(!a.FindColor(c)) ret
out "found"

This works here. But it stops working when I open another window and the button is moved to the left. Because desktop color in that place is different.

Don't know other ways how to detect flashing windows.
#9
I think I might have fixed it, I just changed the transparency to none, so there is only 1 color in the taskbar.
Taking on Quick Macros one day at a time
#10
Confirmed, works now.

Thanks for the help.
Taking on Quick Macros one day at a time
#11
Is there any command for recognizing color of the point of window (or the AccObject) in the case when window is minimized? Tried pixel with flag "2" and FindColor but they both take color from the topmost window.
#12
no


Forum Jump:


Users browsing this thread: 4 Guest(s)